/************************************************************************
*
* Copyright (c) 2014-2025 Barbara Geller & Ansel Sermersheim
* Copyright (c) 1997-2014 Dimitri van Heesch
*
* DoxyPress is free software. You can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* DoxyPress is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Documents produced by DoxyPress are derivative works derived from the
* input used in their production; they are not affected by this license.
*
* https://www.gnu.org/licenses/
*
*************************************************************************/

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define yy_create_buffer code_py_YY_create_buffer
#define yy_delete_buffer code_py_YY_delete_buffer
#define yy_scan_buffer code_py_YY_scan_buffer
#define yy_scan_string code_py_YY_scan_string
#define yy_scan_bytes code_py_YY_scan_bytes
#define yy_init_buffer code_py_YY_init_buffer
#define yy_flush_buffer code_py_YY_flush_buffer
#define yy_load_buffer_state code_py_YY_load_buffer_state
#define yy_switch_to_buffer code_py_YY_switch_to_buffer
#define yypush_buffer_state code_py_YYpush_buffer_state
#define yypop_buffer_state code_py_YYpop_buffer_state
#define yyensure_buffer_stack code_py_YYensure_buffer_stack
#define yy_flex_debug code_py_YY_flex_debug
#define yyin code_py_YYin
#define yyleng code_py_YYleng
#define yylex code_py_YYlex
#define yylineno code_py_YYlineno
#define yyout code_py_YYout
#define yyrestart code_py_YYrestart
#define yytext code_py_YYtext
#define yywrap code_py_YYwrap
#define yyalloc code_py_YYalloc
#define yyrealloc code_py_YYrealloc
#define yyfree code_py_YYfree

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

#ifdef yy_create_buffer
#define code_py_YY_create_buffer_ALREADY_DEFINED
#else
#define yy_create_buffer code_py_YY_create_buffer
#endif

#ifdef yy_delete_buffer
#define code_py_YY_delete_buffer_ALREADY_DEFINED
#else
#define yy_delete_buffer code_py_YY_delete_buffer
#endif

#ifdef yy_scan_buffer
#define code_py_YY_scan_buffer_ALREADY_DEFINED
#else
#define yy_scan_buffer code_py_YY_scan_buffer
#endif

#ifdef yy_scan_string
#define code_py_YY_scan_string_ALREADY_DEFINED
#else
#define yy_scan_string code_py_YY_scan_string
#endif

#ifdef yy_scan_bytes
#define code_py_YY_scan_bytes_ALREADY_DEFINED
#else
#define yy_scan_bytes code_py_YY_scan_bytes
#endif

#ifdef yy_init_buffer
#define code_py_YY_init_buffer_ALREADY_DEFINED
#else
#define yy_init_buffer code_py_YY_init_buffer
#endif

#ifdef yy_flush_buffer
#define code_py_YY_flush_buffer_ALREADY_DEFINED
#else
#define yy_flush_buffer code_py_YY_flush_buffer
#endif

#ifdef yy_load_buffer_state
#define code_py_YY_load_buffer_state_ALREADY_DEFINED
#else
#define yy_load_buffer_state code_py_YY_load_buffer_state
#endif

#ifdef yy_switch_to_buffer
#define code_py_YY_switch_to_buffer_ALREADY_DEFINED
#else
#define yy_switch_to_buffer code_py_YY_switch_to_buffer
#endif

#ifdef yypush_buffer_state
#define code_py_YYpush_buffer_state_ALREADY_DEFINED
#else
#define yypush_buffer_state code_py_YYpush_buffer_state
#endif

#ifdef yypop_buffer_state
#define code_py_YYpop_buffer_state_ALREADY_DEFINED
#else
#define yypop_buffer_state code_py_YYpop_buffer_state
#endif

#ifdef yyensure_buffer_stack
#define code_py_YYensure_buffer_stack_ALREADY_DEFINED
#else
#define yyensure_buffer_stack code_py_YYensure_buffer_stack
#endif

#ifdef yylex
#define code_py_YYlex_ALREADY_DEFINED
#else
#define yylex code_py_YYlex
#endif

#ifdef yyrestart
#define code_py_YYrestart_ALREADY_DEFINED
#else
#define yyrestart code_py_YYrestart
#endif

#ifdef yylex_init
#define code_py_YYlex_init_ALREADY_DEFINED
#else
#define yylex_init code_py_YYlex_init
#endif

#ifdef yylex_init_extra
#define code_py_YYlex_init_extra_ALREADY_DEFINED
#else
#define yylex_init_extra code_py_YYlex_init_extra
#endif

#ifdef yylex_destroy
#define code_py_YYlex_destroy_ALREADY_DEFINED
#else
#define yylex_destroy code_py_YYlex_destroy
#endif

#ifdef yyget_debug
#define code_py_YYget_debug_ALREADY_DEFINED
#else
#define yyget_debug code_py_YYget_debug
#endif

#ifdef yyset_debug
#define code_py_YYset_debug_ALREADY_DEFINED
#else
#define yyset_debug code_py_YYset_debug
#endif

#ifdef yyget_extra
#define code_py_YYget_extra_ALREADY_DEFINED
#else
#define yyget_extra code_py_YYget_extra
#endif

#ifdef yyset_extra
#define code_py_YYset_extra_ALREADY_DEFINED
#else
#define yyset_extra code_py_YYset_extra
#endif

#ifdef yyget_in
#define code_py_YYget_in_ALREADY_DEFINED
#else
#define yyget_in code_py_YYget_in
#endif

#ifdef yyset_in
#define code_py_YYset_in_ALREADY_DEFINED
#else
#define yyset_in code_py_YYset_in
#endif

#ifdef yyget_out
#define code_py_YYget_out_ALREADY_DEFINED
#else
#define yyget_out code_py_YYget_out
#endif

#ifdef yyset_out
#define code_py_YYset_out_ALREADY_DEFINED
#else
#define yyset_out code_py_YYset_out
#endif

#ifdef yyget_leng
#define code_py_YYget_leng_ALREADY_DEFINED
#else
#define yyget_leng code_py_YYget_leng
#endif

#ifdef yyget_text
#define code_py_YYget_text_ALREADY_DEFINED
#else
#define yyget_text code_py_YYget_text
#endif

#ifdef yyget_lineno
#define code_py_YYget_lineno_ALREADY_DEFINED
#else
#define yyget_lineno code_py_YYget_lineno
#endif

#ifdef yyset_lineno
#define code_py_YYset_lineno_ALREADY_DEFINED
#else
#define yyset_lineno code_py_YYset_lineno
#endif

#ifdef yywrap
#define code_py_YYwrap_ALREADY_DEFINED
#else
#define yywrap code_py_YYwrap
#endif

#ifdef yyalloc
#define code_py_YYalloc_ALREADY_DEFINED
#else
#define yyalloc code_py_YYalloc
#endif

#ifdef yyrealloc
#define code_py_YYrealloc_ALREADY_DEFINED
#else
#define yyrealloc code_py_YYrealloc
#endif

#ifdef yyfree
#define code_py_YYfree_ALREADY_DEFINED
#else
#define yyfree code_py_YYfree
#endif

#ifdef yytext
#define code_py_YYtext_ALREADY_DEFINED
#else
#define yytext code_py_YYtext
#endif

#ifdef yyleng
#define code_py_YYleng_ALREADY_DEFINED
#else
#define yyleng code_py_YYleng
#endif

#ifdef yyin
#define code_py_YYin_ALREADY_DEFINED
#else
#define yyin code_py_YYin
#endif

#ifdef yyout
#define code_py_YYout_ALREADY_DEFINED
#else
#define yyout code_py_YYout
#endif

#ifdef yy_flex_debug
#define code_py_YY_flex_debug_ALREADY_DEFINED
#else
#define yy_flex_debug code_py_YY_flex_debug
#endif

#ifdef yylineno
#define code_py_YYlineno_ALREADY_DEFINED
#else
#define yylineno code_py_YYlineno
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#ifndef SIZE_MAX
#define SIZE_MAX               (~(size_t)0)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* begin standard C++ headers. */

/* TODO: this is always defined, so inline it */
#define yyconst const

#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an
 *   integer in range [0..255] for use as an array index.
 */
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin  )
#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 262144
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

extern int yyleng;

extern FILE *yyin, *yyout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
    
    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr)  )

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via yyrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = nullptr; /**< Stack as an array. */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or nullptr.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : nullptr)
/* Same as previous macro, but useful when we know that the buffer stack is not
 * nullptr or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
int yyleng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = nullptr;
static int yy_init = 0;		/* whether we need to initialize */
static int yy_start = 0;	/* start state number */

/* Flag which is used to allow yywrap()'s to do buffer switches
 * instead of setting up a fresh yyin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void yyrestart ( FILE *input_file  );
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
void yy_delete_buffer ( YY_BUFFER_STATE b  );
void yy_flush_buffer ( YY_BUFFER_STATE b  );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
void yypop_buffer_state ( void );

static void yyensure_buffer_stack ( void );
static void yy_load_buffer_state ( void );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )

YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );

void *yyalloc ( yy_size_t  );
void *yyrealloc ( void *, yy_size_t  );
void yyfree ( void *  );

#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        yyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}
#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        yyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

#define code_py_YYwrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
typedef flex_uint8_t YY_CHAR;

FILE *yyin = nullptr, *yyout = nullptr;

typedef int yy_state_type;

extern int yylineno;
int yylineno = 1;

extern char *yytext;
#ifdef yytext_ptr
#undef yytext_ptr
#endif
#define yytext_ptr yytext

static yy_state_type yy_get_previous_state ( void );
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
static int yy_get_next_buffer ( void );
static void yynoreturn yy_fatal_error ( const char* msg  );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	(yytext_ptr) = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 73
#define YY_END_OF_BUFFER 74
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static const flex_int16_t yy_acclist[1157] =
    {   0,
    16423,16423,   64,   64,   74,   72,   73,   70,   72,   73,
       69,   73,   63,   72,   73,   68,   72,   73,   62,   72,
       73,   72,   73,   72,   73,   72,   73,   72,   73,   42,
       69,   73,   27,   41,   72,   73,   27,   41,   72,   73,
       27,   41,   72,   73,   27,   41,   72,   73,   27,   41,
       72,   73,   27,   41,   72,   73,   27,   41,   72,   73,
       27,   41,   72,   73,   27,   41,   72,   73,   27,   41,
       72,   73,   27,   41,   72,   73,   27,   41,   72,   73,
       27,   41,   72,   73,   27,   41,   72,   73,   27,   41,
       72,   73,   27,   41,   72,   73,   27,   41,   72,   73,

       27,   41,   72,   73,   27,   41,   72,   73,   27,   41,
       72,   73,   27,   41,   72,   73,   27,   41,   72,   73,
       27,   41,   72,   73,   27,   41,   72,   73,   27,   41,
       72,   73,   70,   72,   73,   17,   72,   73,   16,   72,
       73,   16,   72,   73,   16,   72,   73,   16,   72,   73,
       16,   72,   73,   19,   72,   73,   18,   70,   72,   73,
       21,   69,   73,   19,   63,   72,   73,   19,   68,   72,
       73,   19,   62,   72,   73,   20,   72,   73,   18,   19,
       72,   73,   22,   72,   73,   19,   72,   73,   19,   72,
       73,   19,   72,   73,   19,   72,   73,   19,   72,   73,

       12,   72,   73,   12,   72,   73,   12,   72,   73,   12,
       72,   73,   12,   72,   73,   13,   70,   72,   73,   13,
       72,   73,   15,   72,   73,   14,   72,   73,   14,   72,
       73,   14,   72,   73,   14,   72,   73,   14,   72,   73,
       40,   69,   73,   27,   72,   73,   27,   72,   73,   27,
       72,   73,   27,   72,   73,   27,   72,   73,   27,   72,
       73,   27,   72,   73,   27,   72,   73,   27,   72,   73,
       27,   72,   73,   27,   72,   73,   27,   72,   73,   27,
       72,   73,   27,   72,   73,   27,   72,   73,   27,   72,
       73,   27,   72,   73,   27,   72,   73,   27,   72,   73,

       27,   72,   73,   27,   72,   73,   27,   72,   73,   27,
       72,   73,   27,   72,   73,   27,   72,   73,   36,   70,
       72,   73,   35,   69,   73,   28,   70,   72,   73,   34,
       69,   73,   68,   72,   73,   32,   72,   73,   32,   72,
       73,   32,   72,   73,   32,   72,   73,   32,   72,   73,
       32,   72,   73,   32,   72,   73,   32,   72,   73,   32,
       72,   73,   32,   72,   73,   32,   72,   73,   32,   72,
       73,   32,   72,   73,   32,   72,   73,   32,   72,   73,
       32,   72,   73,   32,   72,   73,   32,   72,   73,   32,
       72,   73,   32,   72,   73,   32,   72,   73,   32,   72,

       73,   32,   72,   73,   70,   72,   73,16421,   38,   69,
       73, 8231,   72,   73, 8231,   68,   72,   73, 8231,   72,
       73, 8231,   72,   73, 8231,   72,   73, 8231,   72,   73,
       47,   48,   72,   73,   47,   48,   70,   72,   73,   48,
       63,   72,   73,   47,   48,   68,   72,   73,   46,   48,
       62,   72,   73,   47,   48,   72,   73,   47,   48,   72,
       73,   48,   72,   73,   47,   48,   72,   73,   47,   48,
       72,   73,   53,   54,   72,   73,   53,   54,   70,   72,
       73,   52,   54,   63,   72,   73,   53,   54,   68,   72,
       73,   54,   62,   72,   73,   53,   54,   72,   73,   53,

       54,   72,   73,   54,   72,   73,   53,   54,   72,   73,
       53,   54,   72,   73,   57,   59,   72,   73,   57,   59,
       70,   72,   73,   57,   58,   69,   73,   57,   59,   63,
       72,   73,   57,   59,   68,   72,   73,   57,   59,   62,
       72,   73,   57,   59,   72,   73,   57,   59,   72,   73,
       59,   72,   73,   57,   59,   72,   73,   57,   59,   72,
       73,   64,   72,   73,   64,   70,   72,   73,   66,   69,
       73,   63,   64,   72,   73,   64,   68,   72,   73,   62,
       64,   72,   73,   64,   72,   73,   64,   72,   73,   64,
       72,   73,   64,   72,   73,   70,   68,   67,   68,   63,

       62,   71,   25,   27,   41,   27,   41,   27,   41,   27,
       41,   27,   41,   27,   41,   23,   27,   41,   27,   41,
       27,   41,   27,   41,   27,   41,   27,   41,   27,   41,
       27,   41,   27,   41,   27,   41,   27,   41,   24,   27,
       41,   27,   41,   24,   27,   41,   27,   41,   27,   41,
       27,   41,   27,   41,   27,   41,   27,   41,   27,   41,
       27,   41,   27,   41,   27,   41,   27,   41,   27,   41,
       71,   70,   17,   16,   16,   16,   71,   19,   18,   70,
       19,   19,   68,   19,   67,   68,   19,   19,   19,   63,
       19,   62,   19,   19,   71,   12,   12,   12,   71,   13,

       70,   14,   14,   14,   71,   27,   27,   27,   27,   27,
       27,   23,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   24,   27,   27,   24,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       71,   36,   70,   35,   28,   70,   33,   67,   68,   32,
       32,   32,   32,   32,   30,   32,   32,   32,   32,   32,
       32,   32,   32,   32,   32,   32,   31,   32,   32,   31,
       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
       32,   32,   71,   70,16421,   38, 8229,   47,   47,   70,
       47,   68,   47,   67,   68,   63,   47,   44,   44,   43,

       47,   71,   53,   53,   70,   53,   68,   53,   67,   68,
       62,   53,   50,   50,   49,   53,   71,   57,   57,   70,
       57,   57,   68,   57,   67,   68,   68,   57,   57,   57,
       71,   64,   64,   70,   65,   64,   64,   68,   64,   67,
       68,   64,   63,   64,   62,   64,   64,   64,   71,   61,
       67,   68,   60,   26,   27,   41,   27,   41,   27,   41,
       27,   41,   27,   41,   27,   41,   27,   41,   27,   41,
       27,   41,   23,   27,   41,   27,   41,   27,   41,   27,
       41,   27,   41,   27,   41,   27,   41,   27,   41,   27,
       41,   27,   41,   27,   41,   27,   41,   27,   41,   27,

       41,   27,   41,   27,   41,   27,   41,   19,   61,   19,
       67,   68,   19,   60,   14,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   23,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   32,   32,   32,   32,   32,   32,   32,   30,
       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
       32,   32,   32,   32,   32,   32,   45,   61,   47,   67,
       68,   53,   67,   68,   51,   60,   55,   61,   57,   67,
       68,   67,   68,   56,   60,   61,   64,   64,   67,   68,
       60,   64,   26,   27,   41,    3,   27,   41,   23,   27,

       41,   27,   41,   27,   41,   27,   41,   27,   41,   27,
       41,    1,   27,   41,   27,   41,   27,   41,   27,   41,
       27,   41,   27,   41,   27,   41,   27,   41,   27,   41,
       27,   41,   27,   41,   27,    3,   27,   23,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   32,   32,   32,   32,   32,
       32,   32,   32,   32,   32,   32,   29,   31,   32,   32,
       32,   32,   32,   32,   27,   41,   23,   27,   41,   11,
       26,16392,16394,   27,   41,   27,   41,   27,   41,   27,
       41,   27,   41,   27,   41,   27,   41,   27,   23,   27,

       27,   27,   27,   27,   27,   27,   27,   32,   32,   32,
       32,   32,   32,   32,   32,    2,    9,   25,   11,   26,
    16392,16394,   27,   41,   27,   41,    7,   26,16388,16390,
       27,   27,   32,   32, 8202,   26,   27,   41,    5,   25,
        7,   26,16388,16390,   27,   32, 8200,   25, 8202,   26,
     8198,   26, 8196,   25, 8198,   26
    } ;

static const flex_int16_t yy_accept[596] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    4,    5,    6,    8,   11,   13,   16,   19,   22,
       24,   26,   28,   30,   33,   37,   41,   45,   49,   53,
       57,   61,   65,   69,   73,   77,   81,   85,   89,   93,
       97,  101,  105,  109,  113,  117,  121,  125,  129,  133,
      136,  139,  142,  145,  148,  151,  154,  157,  161,  164,
      168,  172,  176,  179,  183,  186,  189,  192,  195,  198,
      201,  204,  207,  210,  213,  216,  220,  223,  226,  229,

      232,  235,  238,  241,  244,  247,  250,  253,  256,  259,
      262,  265,  268,  271,  274,  277,  280,  283,  286,  289,
      292,  295,  298,  301,  304,  307,  310,  313,  316,  319,
      323,  326,  330,  333,  336,  339,  342,  345,  348,  351,
      354,  357,  360,  363,  366,  369,  372,  375,  378,  381,
      384,  387,  390,  393,  396,  399,  402,  405,  409,  412,
      415,  419,  422,  425,  428,  431,  435,  440,  444,  449,
      454,  458,  462,  465,  469,  473,  477,  482,  487,  492,
      496,  500,  504,  507,  511,  515,  519,  524,  528,  533,
      538,  543,  547,  551,  554,  558,  562,  565,  569,  572,

      576,  580,  584,  587,  590,  593,  596,  597,  597,  598,
      600,  600,  601,  602,  602,  603,  604,  604,  606,  608,
      610,  612,  614,  616,  619,  621,  623,  625,  627,  629,
      631,  633,  635,  637,  639,  642,  644,  647,  649,  651,
      653,  655,  657,  659,  661,  663,  665,  667,  669,  672,
      673,  674,  675,  676,  678,  679,  681,  682,  684,  687,
      688,  689,  691,  693,  694,  696,  697,  698,  700,  702,
      702,  703,  704,  706,  707,  708,  709,  710,  711,  712,
      714,  715,  716,  717,  718,  719,  720,  721,  722,  723,
      724,  726,  727,  729,  730,  731,  732,  733,  734,  735,

      736,  737,  738,  739,  740,  742,  744,  745,  747,  750,
      751,  752,  753,  754,  755,  757,  758,  759,  760,  761,
      762,  763,  764,  765,  766,  767,  769,  770,  772,  773,
      774,  775,  776,  777,  778,  779,  780,  781,  782,  784,
      786,  787,  788,  789,  791,  791,  793,  796,  797,  798,
      799,  800,  801,  803,  804,  806,  808,  811,  811,  812,
      813,  814,  815,  816,  818,  819,  819,  821,  822,  824,
      827,  828,  829,  830,  832,  833,  835,  835,  836,  837,
      839,  842,  843,  845,  847,  848,  850,  851,  853,  854,
      855,  857,  859,  861,  863,  865,  867,  869,  871,  873,

      876,  878,  880,  882,  884,  886,  888,  890,  892,  894,
      896,  898,  900,  902,  904,  906,  908,  910,  913,  915,
      916,  917,  918,  919,  920,  921,  922,  923,  924,  925,
      927,  928,  929,  930,  931,  932,  933,  934,  935,  936,
      937,  938,  939,  940,  941,  942,  943,  944,  945,  946,
      947,  948,  949,  950,  952,  953,  954,  955,  956,  957,
      958,  959,  960,  961,  962,  963,  964,  965,  966,  967,
      969,  972,  972,  975,  977,  977,  979,  982,  984,  986,
      988,  991,  993,  994,  996,  999, 1002, 1004, 1006, 1008,
     1010, 1010, 1012, 1013, 1015, 1017, 1019, 1021, 1023, 1025,

     1027, 1029, 1031, 1033, 1035, 1036, 1038, 1040, 1041, 1042,
     1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
     1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062,
     1063, 1064, 1065, 1066, 1067, 1070, 1071, 1072, 1073, 1074,
     1075, 1077, 1080, 1084, 1086, 1088, 1090, 1092, 1094, 1096,
     1098, 1098, 1099, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
     1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117,
     1119, 1119, 1123, 1125, 1127, 1131, 1132, 1133, 1134, 1135,
     1137, 1139, 1141, 1141, 1145, 1146, 1147, 1149, 1149, 1151,
     1153, 1155, 1155, 1157, 1157

    } ;

static const YY_CHAR yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    4,    5,    6,    1,    4,    4,    7,    8,
        9,    4,    4,   10,    4,   11,    4,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   13,    4,    4,
        4,    4,    1,    1,   14,   14,   14,   14,   14,   15,
       14,   14,   14,   14,   14,   14,   14,   16,   14,   14,
       14,   17,   14,   18,   19,   14,   14,   14,   14,   14,
        4,   20,    4,    1,   21,    4,   22,   23,   24,   25,

       26,   27,   28,   29,   30,   14,   31,   32,   33,   34,
       35,   36,   14,   37,   38,   39,   40,   14,   41,   42,
       43,   14,    4,    4,    4,    4,    1,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
       44,   45,   45,   45,   45,   45,   45,   45,   45,   45,

       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45
    } ;

static const YY_CHAR yy_meta[46] =
    {   0,
        1,    2,    3,    4,    5,    4,    5,    6,    2,    4,
        7,    8,    2,    9,    9,    9,    9,    9,    9,   10,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9
    } ;

static const flex_int16_t yy_base[639] =
    {   0,
        0,   44,   89,    0,  134,    0,  179,    0,  224,    0,
      269,    0,  314,    0,    6,    8,  359,    0,  404,  449,
        0,    0,    0,    0,  493,  537,  581,  625,  669,  713,
      757,  801, 1913, 1914, 1910, 1914, 1906, 1904, 1902,    7,
       11,   15, 1864, 1914,   13,   19,   18,   28,   23,   51,
      404,   46,  405,   56,  411,  428,  416,  449,   58,  424,
      409,  453,  462,  466,  470,  497,  495,  417,  418,   36,
     1914,    0,    8,  504,  510, 1863,    0, 1904, 1914, 1900,
      553, 1897, 1914,    0, 1914,  846,  866,    6,   38,  521,
        0,   65,  515,  541, 1859, 1900, 1914, 1914, 1890,   66,

      562,  585,  474, 1914,   68,  423,  560,  586,  508,  598,
      542,  552,  602,  603,  608,  643,  609,  625,  635,  656,
      645,  673,  685,  686,  690,  717,  715,  691,  564,   83,
     1914, 1898, 1914, 1893,    0, 1876,  486, 1860,  724,   40,
     1859,  398, 1869,  376,  631, 1862,  709, 1871, 1857, 1854,
      514,  678, 1853,  732,  442, 1859, 1844,  477, 1914, 1914,
     1881,  524,  750,  761, 1842,    0, 1883, 1879,  618, 1876,
      530,  768,  645,  772, 1838,    0, 1879, 1875,  775, 1872,
      672,  779,  749,  794, 1834, 1857,  667, 1856, 1870,  807,
     1867,  810,  817,  785,  828,  726,    0, 1871,  495, 1867,

     1865, 1863,  698,  857,  873, 1825, 1866, 1862,    0,    0,
     1859, 1860, 1830,  733, 1773, 1914,    0,  596,  817,  821,
      828,  874,  815,  850,  876,  881,  887,  888,  893,  889,
      898,  897,  903,  909,  852,  914,  916,  918,  922,  928,
      929,  934,  935,  941,  945,  946,  947,  952,  954,  562,
     1914,    0,  786, 1763,    0, 1795, 1782,  981,  983, 1770,
      814, 1762, 1742,    0,  962,    0,  837, 1683, 1718,    0,
     1707,  970,  872,  960,  971,  976,  989,  994,  996, 1000,
     1001, 1006, 1005, 1007, 1011, 1012, 1022, 1024, 1029, 1034,
     1039, 1040, 1044, 1046, 1051, 1055, 1057, 1059, 1063, 1064,

     1069, 1070, 1074, 1075, 1080,  769, 1914, 1696,    0,    0,
     1659, 1649,  965, 1656,  617, 1636, 1637, 1624, 1622,  718,
     1618, 1605, 1601, 1588, 1524,    0, 1522,    0, 1524, 1517,
     1517, 1523, 1522, 1511, 1504, 1516, 1504, 1501, 1470,  945,
     1914, 1914,    0, 1499, 1489, 1053, 1087, 1483,  988, 1914,
     1022, 1914, 1439,    0, 1479, 1090, 1098, 1470, 1448, 1099,
     1914, 1096, 1914, 1400, 1416, 1112,  715, 1426, 1118, 1123,
     1419, 1414, 1109, 1064,    0, 1414,  579, 1914, 1406,    0,
        0, 1399, 1389, 1375, 1104, 1318, 1914,    0, 1914, 1123,
     1124, 1125, 1129, 1131, 1133, 1137, 1138, 1139, 1145, 1150,

     1152, 1157, 1161, 1163, 1162, 1167, 1169, 1178, 1180, 1185,
     1186, 1191, 1195, 1197, 1199, 1201,    0, 1212,    0, 1346,
     1205, 1215, 1219, 1224, 1226, 1231, 1236, 1238, 1240, 1250,
     1246, 1251, 1255, 1256, 1257, 1261, 1272, 1274, 1278, 1280,
     1284, 1285, 1290, 1291, 1292, 1297, 1314, 1324, 1322, 1293,
     1298, 1274, 1255,    0, 1260, 1250, 1249, 1249, 1237, 1217,
     1203, 1213, 1179, 1181, 1173, 1160, 1166, 1163, 1134, 1914,
     1299, 1179, 1304, 1914, 1253, 1914, 1323, 1161, 1914,    0,
        0,    0, 1302, 1307, 1323, 1324, 1328, 1329, 1330, 1334,
        0, 1336, 1152, 1338, 1343, 1347, 1348, 1352, 1356, 1360,

     1362, 1368, 1370, 1372, 1376, 1380, 1381, 1382, 1390, 1392,
     1396, 1397, 1401, 1407, 1402, 1409, 1417, 1418, 1422, 1424,
     1430, 1432, 1439, 1101, 1085, 1096, 1022, 1008, 1001,  990,
      948,  919,  898,  903,    0,  879,  886,  870,  865,  850,
     1441, 1443, 1445, 1451, 1452, 1457, 1458, 1459, 1464, 1463,
        0, 1465, 1476, 1471, 1484, 1485, 1492, 1491, 1498, 1499,
      830,  825,  804,  768,  751,  726,  691,  674,  647, 1914,
        0, 1500, 1504, 1505, 1510, 1511, 1517,  599,  569, 1518,
     1523, 1914,    0, 1524, 1528,  523, 1914,    0, 1529, 1530,
     1914,    0, 1534, 1914, 1560, 1570, 1580, 1590, 1600, 1610,

     1620, 1625, 1627, 1636, 1646, 1656, 1659, 1662, 1666, 1668,
     1676, 1686, 1695, 1705, 1715, 1724, 1734, 1744, 1754, 1764,
     1774, 1784,  514, 1794,  405, 1804, 1814, 1824, 1834, 1839,
       78, 1843,   56,   33, 1847, 1851,   16, 1855
    } ;

static const flex_int16_t yy_def[639] =
    {   0,
      595,  595,  594,    3,  594,    5,  594,    7,  594,    9,
      594,   11,  594,   13,    2,    2,  594,   17,  596,  596,
        2,    2,    2,    2,  597,  597,  598,  598,  599,  599,
      600,  600,  594,  594,  594,  594,  594,  601,  594,  594,
      594,  594,  594,  594,  602,  602,  602,  602,  602,  602,
      602,  602,  602,  602,  602,  602,  602,  602,  602,  602,
      602,  602,  602,  602,  602,  602,  602,  602,  602,  594,
      594,  603,  603,  603,  603,  603,  604,  594,  594,  604,
      605,  604,  594,  604,  594,  606,  606,   87,   87,   87,
      607,  607,  607,  607,  607,  594,  594,  594,  608,  608,

      608,  608,  608,  594,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  594,
      594,  594,  594,  601,  610,  610,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  611,  594,  594,
      601,  594,  594,  594,  594,  612,  612,  594,  613,  594,
      612,  612,  614,  612,  612,  615,  615,  594,  616,  594,
      615,  615,  617,  615,  615,  618,  618,  618,  594,  619,
      594,  618,  618,  618,  618,  618,  620,  620,  594,  620,

      621,  620,  620,  620,  620,  620,  594,  594,  601,  622,
      594,  594,  594,  594,  594,  594,  623,  602,  602,  602,
      602,  602,  602,  602,  602,  602,  602,  602,  602,  602,
      602,  602,  602,  602,  602,  602,  602,  602,  602,  602,
      602,  602,  602,  602,  602,  602,  602,  602,  602,  594,
      594,  603,  603,  603,  604,  594,  604,  605,  624,  604,
       87,  604,  604,   87,   87,  607,  607,  607,  594,  625,
      608,  608,  608,  609,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  609,

      609,  609,  609,  609,  609,  594,  594,  594,  622,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  611,
      594,  594,  612,  612,  594,  613,  626,  594,  612,  594,
      594,  594,  612,  615,  615,  616,  627,  594,  594,  615,
      594,  594,  594,  615,  618,  618,  618,  594,  619,  628,
      619,  594,  618,  618,  620,  620,  594,  594,  620,  621,
      629,  620,  620,  620,  620,  620,  594,  622,  594,  630,
      602,  602,  602,  602,  602,  602,  602,  602,  602,  602,

      602,  602,  602,  602,  602,  602,  602,  602,  602,  602,
      602,  602,  602,  602,  602,  602,  604,  624,  604,  608,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  594,
      626,  594,  627,  594,  594,  594,  628,  628,  594,  620,
      629,  620,  630,  602,  602,  602,  602,  602,  602,  602,
      631,  602,  594,  602,  602,  602,  602,  602,  602,  602,

      602,  602,  602,  602,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
      609,  609,  609,  610,  610,  610,  610,  610,  610,  610,
      610,  610,  610,  610,  610,  610,  610,  610,  610,  610,
      602,  602,  632,  602,  602,  602,  602,  602,  602,  602,
      633,  609,  609,  609,  609,  609,  609,  609,  609,  609,
      610,  610,  610,  610,  610,  610,  610,  610,  594,  594,
      634,  632,  602,  602,  635,  609,  609,  610,  610,  636,
      602,  594,  637,  635,  609,  610,  594,  634,  636,  638,
      594,  637,  638,    0,  594,  594,  594,  594,  594,  594,

      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594
    } ;

static const flex_int16_t yy_nxt[1960] =
    {   0,
      594,   35,   36,  594,   37,   38,   39,  130,  131,  130,
      131,  212,  212,  213,  213,  212,   40,  213,   41,  212,
      216,  213,  264,  217,  590,  216,  216,  214,  217,  217,
      216,  214,  212,  217,  213,  216,   40,  250,  217,   42,
      219,  580,  264,  251,   43,   35,   36,  214,   37,   38,
       39,  214,  220,  216,  264,  212,  217,  213,  216,  221,
       40,  217,   41,  216,  575,  216,  217,  222,  217,  212,
      212,  213,  213,  314,  264,  216,  270,  315,  217,  238,
       40,  228,  225,   42,  306,  307,  543,  222,   43,   34,
       35,   44,   34,   37,   38,   39,   34,   34,   34,   34,

       34,   34,   45,   46,   47,   48,   49,   50,   34,   45,
       51,   52,   53,   54,   55,   56,   57,   45,   58,   45,
       59,   45,   60,   61,   62,   63,   64,   65,   66,   67,
       45,   68,   45,   69,   34,   70,   36,   34,   37,   38,
       39,   71,   34,   34,   34,   34,   34,   72,   72,   72,
       73,   72,   74,   34,   72,   72,   72,   72,   72,   72,
       72,   72,   72,   72,   72,   72,   72,   72,   72,   72,
       73,   72,   72,   75,   72,   72,   72,   72,   76,   77,
       78,   79,   77,   80,   81,   82,   34,   83,   84,   77,
       77,   85,   86,   86,   86,   87,   86,   88,   77,   86,

       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
       86,   86,   86,   86,   86,   87,   86,   86,   89,   86,
       86,   86,   86,   90,   34,   35,   36,   34,   37,   38,
       39,   34,   34,   34,   34,   34,   34,   91,   91,   91,
       92,   91,   93,   34,   91,   91,   91,   91,   91,   91,
       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
       92,   91,   91,   94,   91,   91,   91,   91,   95,   34,
       96,   36,   34,   37,   38,   39,   97,   97,   97,   34,
       34,   98,   99,   99,   99,  100,   99,  101,   34,   99,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,

       99,   99,   99,   99,   99,  100,   99,   99,  102,   99,
       99,   99,   99,  103,   34,   35,  104,   34,   37,   38,
       39,   34,   34,   34,   34,   34,   34,  105,  106,  107,
      108,  109,  110,   34,  105,  111,  112,  113,  114,  115,
      116,  117,  105,  118,  105,  119,  105,  120,  121,  122,
      123,  124,  125,  126,  127,  105,  128,  105,  129,   34,
      132,  133,   34,   37,  134,   39,   34,   34,   34,   34,
       34,   34,  135,  136,  135,  137,  138,  139,   34,  135,
      140,  141,  142,  143,  144,  145,  146,  135,  147,  135,
      148,  135,  149,  150,  151,  152,  135,  153,  154,  155,

      135,  156,  135,  157,   34,  158,  159,  320,   37,  161,
       39,  216,  216,  420,  217,  217,  216,  321,  216,  217,
      162,  217,  163,  216,  216,  216,  217,  217,  217,  317,
      216,  216,  318,  217,  217,  216,  226,  223,  217,  227,
      162,  224,  229,  164,  275,  237,  248,  234,  165,   34,
      158,  159,  230,   37,  161,   39,  216,  231,  239,  217,
      216,  249,  232,  217,  233,  162,  212,  163,  213,  216,
      336,  337,  217,  216,  240,  235,  217,  216,  340,  341,
      217,  236,  237,  242,  270,  162,  237,  243,  164,  241,
      212,  244,  213,  165,  167,   36,  377,  168,  169,  170,

      378,  212,  216,  213,  216,  217,  245,  217,  212,  171,
      213,  172,  173,  222,  212,  216,  213,  273,  217,  212,
      253,  213,  390,  246,  247,  255,  253,  255,  212,  171,
      213,  267,  174,  222,  348,  331,  213,  175,  167,   36,
      253,  168,  169,  170,  277,  212,  253,  213,  328,  216,
      332,  267,  217,  171,  209,  172,  173,  267,  259,  216,
      209,  209,  217,  250,  265,  209,  212,  216,  213,  251,
      217,  216,  270,  171,  217,  279,  174,  267,  272,  280,
      377,  175,  177,   36,  378,  178,  179,  180,  281,  212,
      212,  213,  213,  216,  276,  270,  217,  181,  272,  182,

      183,  272,  212,  216,  213,  216,  217,  305,  217,  216,
      216,  328,  217,  217,  278,  216,  216,  181,  217,  217,
      184,  272,  209,  347,  209,  185,  177,   36,  284,  178,
      179,  180,  216,  282,  278,  217,  283,  209,  586,  285,
      290,  181,  216,  182,  183,  217,  351,  352,  569,  286,
      216,  291,  216,  217,  449,  217,  294,  292,  293,  450,
      322,  181,  293,  216,  184,  323,  217,  324,  367,  185,
      187,  188,  287,  189,  190,  191,  212,  288,  359,  289,
      216,  293,  212,  217,  213,  192,  366,  193,  194,  212,
      295,  213,  216,  216,  296,  217,  217,  216,  216,  333,

      217,  217,  383,  334,  384,  192,  298,  328,  195,  297,
      299,  300,  454,  196,  187,  188,  367,  189,  190,  191,
      304,  212,  216,  213,  216,  217,  301,  217,  212,  192,
      213,  193,  194,  278,  366,  326,  212,  212,  213,  213,
      313,  327,  328,  302,  303,  366,  328,  455,  313,  192,
      362,  363,  195,  278,  212,  456,  213,  196,  198,  199,
      313,  200,  201,  202,  454,  212,  214,  213,  313,  374,
      306,  307,  348,  203,  213,  204,  348,  214,  213,  209,
      357,  209,  454,  212,  349,  359,  214,  594,  349,  365,
      212,  365,  213,  203,  209,  360,  205,  214,  212,  579,

      359,  206,  198,  199,  349,  200,  201,  202,  349,  365,
      360,  209,  370,  209,  212,  360,  213,  203,  255,  204,
      255,  212,  216,  213,  216,  217,  371,  217,  216,  366,
      360,  217,  212,  373,  213,  216,  366,  203,  217,  237,
      205,  212,  328,  213,  373,  206,  255,  366,  391,  255,
      255,  255,  255,  373,  392,  255,  255,  216,  578,  216,
      217,  383,  217,  384,  373,  255,  255,  393,  454,  255,
      262,  255,  263,  385,  328,  255,  255,  383,  212,  384,
      213,  216,  270,  216,  217,  255,  217,  394,  216,  385,
      328,  217,  395,  385,  216,  216,  216,  217,  217,  217,

      216,  396,  397,  217,  216,  216,  568,  217,  217,  385,
      216,  328,  403,  217,  400,  273,  216,  328,  398,  217,
      399,  216,  401,  216,  217,  216,  217,  567,  217,  216,
      402,  404,  217,  237,  566,  216,  216,  405,  217,  217,
      565,  216,  216,  406,  217,  217,  340,  341,  216,  407,
      408,  217,  216,  216,  216,  217,  217,  217,  410,  216,
      237,  216,  217,  411,  217,  409,  255,  216,  255,  212,
      217,  213,  413,  412,  212,  414,  213,  416,  216,  564,
      270,  217,  209,  216,  388,  415,  217,  237,  209,  209,
      388,  388,  348,  209,  213,  388,  216,  249,  212,  217,

      213,  216,  421,  216,  217,  265,  217,  216,  216,  422,
      217,  217,  216,  216,  216,  217,  217,  217,  216,  216,
      293,  217,  217,  472,  352,  563,  426,  427,  423,  216,
      562,  216,  217,  430,  217,  433,  216,  424,  429,  217,
      431,  216,  425,  428,  217,  454,  216,  216,  432,  217,
      217,  216,  328,  216,  217,  434,  217,  209,  216,  209,
      293,  217,  216,  435,  216,  217,  216,  217,  436,  217,
      216,  216,  209,  217,  217,  437,  216,  216,  438,  217,
      217,  216,  216,  366,  217,  217,  440,  216,  441,  293,
      217,  388,  439,  388,  209,  443,  209,  475,  363,  444,

      446,  442,  388,  212,  388,  359,  388,  374,  383,  209,
      384,  293,  445,  212,  594,  213,  365,  388,  365,  454,
      365,  561,  209,  305,  209,  365,  454,  388,  366,  388,
      216,  216,  216,  217,  217,  217,  216,  371,  216,  217,
      216,  217,  478,  217,  216,  216,  216,  217,  217,  491,
      485,  493,  216,  493,  486,  217,  487,  216,  489,  216,
      217,  484,  217,  594,  216,  540,  488,  217,  216,  216,
      216,  217,  217,  217,  216,  490,  216,  217,  237,  217,
      472,  352,  237,  492,  495,  216,  494,  216,  217,  496,
      217,  454,  216,  216,  486,  217,  217,  539,  216,  538,

      498,  217,  216,  497,  216,  217,  216,  217,  216,  217,
      537,  217,  216,  388,  536,  217,  535,  237,  499,  388,
      388,  502,  216,  500,  388,  217,  216,  486,  503,  217,
      501,  216,  504,  216,  217,  534,  217,  533,  216,  532,
      506,  217,  505,  216,  507,  216,  217,  216,  491,  508,
      217,  493,  510,  216,  475,  363,  217,  216,  216,  509,
      217,  217,  216,  216,  216,  217,  217,  217,  216,  454,
      531,  217,  293,  511,  530,  328,  293,  514,  512,  216,
      513,  216,  217,  515,  217,  216,  328,  216,  217,  507,
      217,  216,  216,  529,  217,  217,  517,  216,  216,  216,

      217,  217,  217,  388,  216,  388,  516,  217,  388,  216,
      388,  528,  217,  518,  216,  293,  521,  217,  388,  527,
      507,  519,  522,  388,  520,  365,  526,  388,  523,  388,
      216,  216,  486,  217,  217,  216,  216,  216,  217,  217,
      217,  216,  478,  216,  217,  216,  217,  525,  217,  454,
      216,  524,  486,  217,  216,  216,  270,  217,  217,  216,
      237,  386,  217,  216,  541,  544,  217,  216,  547,  216,
      217,  542,  217,  545,  546,  216,  549,  216,  551,  216,
      217,  382,  217,  216,  548,  237,  217,  216,  216,  216,
      217,  217,  217,  379,  237,  237,  237,  216,  550,  216,

      217,  507,  217,  216,  216,  482,  217,  217,  216,  216,
      480,  217,  217,  507,  216,  376,  216,  217,  552,  217,
      479,  594,  293,  557,  216,  216,  554,  217,  217,  216,
      476,  216,  217,  553,  217,  366,  555,  216,  556,  216,
      551,  559,  217,  364,  569,  558,  216,  293,  216,  217,
      216,  217,  570,  217,  358,  571,  293,  293,  216,  216,
      560,  217,  217,  293,  216,  216,  216,  217,  217,  217,
      216,  216,  216,  217,  217,  217,  474,  569,  216,  486,
      355,  217,  353,  216,  573,  486,  217,  345,  574,  486,
      237,  216,  216,  470,  217,  217,  237,  486,  216,  216,

      344,  217,  217,  507,  576,  216,  216,  570,  217,  217,
      571,  216,  216,  339,  217,  217,  577,  582,  216,  507,
      583,  217,  293,  507,  216,  587,  469,  217,  588,  507,
      216,  582,  293,  217,  583,  216,  587,  591,  217,  588,
      592,  591,  468,  581,  592,  467,  328,  237,  237,  466,
      585,  465,  464,  293,  463,  328,  462,  461,  460,  293,
       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
      166,  166,  166,  166,  166,  166,  166,  166,  166,  166,
      176,  176,  176,  176,  176,  176,  176,  176,  176,  176,

      186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
      197,  197,  197,  197,  197,  197,  197,  197,  197,  197,
      209,  209,  459,  209,  209,  209,  209,  209,  209,  209,
      218,  218,  218,  218,  252,  252,  255,  328,  458,  255,
      255,  457,  255,  255,  255,  255,  258,  258,  454,  258,
      258,  258,  258,  258,  258,  258,  261,  453,  452,  261,
      261,  451,  261,  261,  261,  261,  266,  266,  271,  271,
      271,  274,  274,  274,  274,  310,  310,  342,  342,  342,
      328,  342,  342,  342,  342,  342,  343,  343,  448,  343,
      447,  343,  343,  343,  343,  346,  346,  308,  346,  346,

      346,  346,  346,  346,  346,  350,  350,  350,  350,  350,
      350,  350,  350,  350,  350,  354,  354,  270,  354,  269,
      354,  354,  354,  354,  356,  356,  268,  356,  356,  356,
      356,  356,  356,  356,  361,  361,  361,  361,  361,  361,
      361,  361,  361,  361,  365,  365,  365,  365,  260,  365,
      365,  365,  365,  365,  369,  369,  369,  369,  369,  369,
      369,  369,  369,  369,  375,  375,  257,  375,  375,  375,
      375,  375,  375,  375,  380,  380,  419,  380,  380,  380,
      380,  380,  380,  380,  388,  388,  417,  388,  388,  388,
      388,  388,  388,  388,  418,  418,  256,  418,  418,  418,

      418,  418,  418,  418,  471,  471,  254,  471,  471,  471,
      471,  471,  471,  471,  473,  473,  215,  473,  473,  473,
      473,  473,  473,  473,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  481,  481,  211,  481,  481,  481,
      481,  481,  481,  481,  483,  483,  483,  483,  572,  572,
      572,  572,  584,  584,  584,  584,  589,  589,  589,  589,
      593,  593,  593,  593,  208,  389,  387,  207,  386,  382,
      381,  379,  376,  372,  368,  366,  366,  364,  358,  208,
      355,  353,  211,  345,  344,  215,  210,  339,  338,  335,
      328,  330,  329,  325,  319,  316,  312,  311,  309,  308,

      270,  269,  268,  260,  257,  256,  254,  215,  211,  210,
      208,  207,  594,   33,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594
    } ;

static const flex_int16_t yy_chk[1960] =
    {   0,
        0,    1,    1,    0,    1,    1,    1,   15,   15,   16,
       16,   40,   73,   40,   73,   41,    1,   41,    1,   42,
       45,   42,   88,   45,  637,   47,   46,   41,   47,   46,
       49,   42,   48,   49,   48,   48,    1,   70,   48,    1,
       46,  634,   88,   70,    1,    2,    2,   41,    2,    2,
        2,   42,   47,   52,   89,   50,   52,   50,   50,   49,
        2,   50,    2,   54,  633,   59,   54,   50,   59,   92,
      100,   92,  100,  140,   89,  105,  100,  140,  105,   59,
        2,   54,   52,    2,  130,  130,  631,   50,    2,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,

        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,

        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,

       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,

       17,   17,   17,   17,   19,   19,   19,  144,   19,   19,
       19,   51,   53,  625,   51,   53,   61,  144,   55,   61,
       19,   55,   19,   57,   68,   69,   57,   68,   69,  142,
      106,   60,  142,  106,   60,   56,   53,   51,   56,   53,
       19,   51,   55,   19,  106,   61,   68,   57,   19,   20,
       20,   20,   55,   20,   20,   20,   58,   56,   60,   58,
       62,   69,   56,   62,   56,   20,   63,   20,   63,   63,
      155,  155,   63,   64,   62,   58,   64,   65,  158,  158,
       65,   58,   58,   63,  103,   20,   58,   63,   20,   62,
      137,   64,  137,   20,   25,   25,  199,   25,   25,   25,

      199,   66,   67,   66,   66,   67,   65,   66,   74,   25,
       74,   25,   25,   66,   75,  109,   75,  103,  109,   93,
       74,   93,  623,   67,   67,   90,   75,   90,  162,   25,
      162,   93,   25,   66,  171,  151,  171,   25,   26,   26,
       74,   26,   26,   26,  109,   94,   75,   94,  586,  111,
      151,   93,  111,   26,   81,   26,   26,   94,   81,  112,
       81,   81,  112,  250,   90,   81,  101,  107,  101,  250,
      107,  129,  101,   26,  129,  111,   26,   94,  101,  111,
      377,   26,   27,   27,  377,   27,   27,   27,  112,  102,
      108,  102,  108,  108,  107,  102,  108,   27,  101,   27,

       27,  102,  110,  218,  110,  110,  218,  129,  110,  113,
      114,  579,  113,  114,  110,  115,  117,   27,  115,  117,
       27,  102,  169,  169,  169,   27,   28,   28,  114,   28,
       28,   28,  118,  113,  110,  118,  113,  169,  578,  115,
      117,   28,  119,   28,   28,  119,  173,  173,  569,  115,
      116,  118,  121,  116,  315,  121,  119,  118,  118,  315,
      145,   28,  118,  120,   28,  145,  120,  145,  187,   28,
       29,   29,  116,   29,   29,   29,  181,  116,  181,  116,
      122,  121,  152,  122,  152,   29,  187,   29,   29,  123,
      120,  123,  123,  124,  122,  123,  124,  125,  128,  152,

      125,  128,  203,  152,  203,   29,  123,  568,   29,  122,
      123,  124,  567,   29,   30,   30,  367,   30,   30,   30,
      128,  126,  127,  126,  126,  127,  125,  126,  139,   30,
      139,   30,   30,  126,  367,  147,  154,  214,  154,  214,
      139,  147,  147,  127,  127,  196,  147,  320,  154,   30,
      183,  183,   30,  126,  163,  320,  163,   30,   31,   31,
      139,   31,   31,   31,  566,  164,  163,  164,  154,  196,
      306,  306,  172,   31,  172,   31,  174,  164,  174,  179,
      179,  179,  565,  182,  172,  182,  163,  194,  174,  194,
      253,  194,  253,   31,  179,  182,   31,  164,  184,  564,

      184,   31,   32,   32,  172,   32,   32,   32,  174,  190,
      184,  190,  190,  190,  192,  182,  192,   32,  261,   32,
      261,  193,  223,  193,  219,  223,  190,  219,  220,  192,
      184,  220,  195,  193,  195,  221,  193,   32,  221,  223,
       32,  267,  563,  267,  195,   32,   86,  195,  219,   86,
       86,   86,   86,  193,  220,   86,   86,  224,  562,  235,
      224,  204,  235,  204,  195,   86,   87,  221,  561,   87,
       87,   87,   87,  204,  540,   87,   87,  205,  222,  205,
      222,  222,  273,  225,  222,   87,  225,  224,  226,  205,
      539,  226,  224,  204,  227,  228,  230,  227,  228,  230,

      229,  225,  226,  229,  232,  231,  538,  232,  231,  205,
      233,  537,  230,  233,  228,  273,  234,  536,  226,  234,
      227,  236,  229,  237,  236,  238,  237,  534,  238,  239,
      229,  231,  239,  232,  533,  240,  241,  233,  240,  241,
      532,  242,  243,  234,  242,  243,  340,  340,  244,  236,
      238,  244,  245,  246,  247,  245,  246,  247,  241,  248,
      239,  249,  248,  242,  249,  240,  265,  274,  265,  313,
      274,  313,  244,  243,  272,  246,  272,  248,  275,  531,
      272,  275,  258,  276,  259,  247,  276,  245,  258,  258,
      259,  259,  349,  258,  349,  259,  277,  249,  278,  277,

      278,  278,  275,  279,  278,  265,  279,  280,  281,  276,
      280,  281,  283,  282,  284,  283,  282,  284,  285,  286,
      279,  285,  286,  351,  351,  530,  281,  282,  277,  287,
      529,  288,  287,  284,  288,  286,  289,  280,  283,  289,
      285,  290,  280,  282,  290,  528,  291,  292,  285,  291,
      292,  293,  527,  294,  293,  287,  294,  346,  295,  346,
      288,  295,  296,  289,  297,  296,  298,  297,  290,  298,
      299,  300,  346,  299,  300,  292,  301,  302,  294,  301,
      302,  303,  304,  374,  303,  304,  297,  305,  298,  295,
      305,  347,  296,  347,  356,  300,  356,  362,  362,  302,

      304,  299,  357,  360,  357,  360,  347,  374,  385,  356,
      385,  301,  303,  373,  366,  373,  366,  357,  366,  526,
      369,  525,  369,  305,  369,  370,  524,  370,  373,  370,
      390,  391,  392,  390,  391,  392,  393,  369,  394,  393,
      395,  394,  370,  395,  396,  397,  398,  396,  397,  398,
      392,  400,  399,  493,  393,  399,  394,  400,  396,  401,
      400,  391,  401,  478,  402,  469,  395,  402,  403,  405,
      404,  403,  405,  404,  406,  397,  407,  406,  401,  407,
      472,  472,  402,  399,  404,  408,  403,  409,  408,  406,
      409,  468,  410,  411,  405,  410,  411,  467,  412,  466,

      408,  412,  413,  407,  414,  413,  415,  414,  416,  415,
      465,  416,  421,  418,  464,  421,  463,  409,  410,  418,
      418,  413,  422,  411,  418,  422,  423,  415,  414,  423,
      412,  424,  416,  425,  424,  462,  425,  461,  426,  460,
      422,  426,  421,  427,  423,  428,  427,  429,  428,  424,
      429,  430,  426,  431,  475,  475,  431,  430,  432,  425,
      430,  432,  433,  434,  435,  433,  434,  435,  436,  459,
      458,  436,  431,  427,  457,  456,  432,  434,  429,  437,
      433,  438,  437,  436,  438,  439,  455,  440,  439,  435,
      440,  441,  442,  453,  441,  442,  438,  443,  444,  445,

      443,  444,  445,  471,  446,  471,  437,  446,  473,  483,
      473,  452,  483,  440,  484,  439,  443,  484,  471,  451,
      445,  441,  444,  473,  442,  477,  450,  477,  446,  477,
      485,  486,  484,  485,  486,  487,  488,  489,  487,  488,
      489,  490,  477,  492,  490,  494,  492,  449,  494,  448,
      495,  447,  488,  495,  496,  497,  420,  496,  497,  498,
      489,  386,  498,  499,  487,  492,  499,  500,  496,  501,
      500,  490,  501,  494,  495,  502,  498,  503,  502,  504,
      503,  384,  504,  505,  497,  500,  505,  506,  507,  508,
      506,  507,  508,  383,  499,  503,  504,  509,  501,  510,

      509,  505,  510,  511,  512,  382,  511,  512,  513,  515,
      379,  513,  515,  509,  514,  376,  516,  514,  508,  516,
      372,  371,  510,  515,  517,  518,  512,  517,  518,  519,
      368,  520,  519,  511,  520,  365,  513,  521,  514,  522,
      521,  517,  522,  364,  542,  516,  523,  519,  541,  523,
      542,  541,  543,  542,  359,  543,  518,  522,  544,  545,
      520,  544,  545,  523,  546,  547,  548,  546,  547,  548,
      550,  549,  552,  550,  549,  552,  358,  553,  554,  541,
      355,  554,  353,  553,  544,  549,  553,  348,  546,  547,
      545,  555,  556,  345,  555,  556,  550,  548,  558,  557,

      344,  558,  557,  552,  554,  559,  560,  572,  559,  560,
      572,  573,  574,  339,  573,  574,  556,  575,  576,  559,
      575,  576,  555,  557,  577,  580,  338,  577,  580,  558,
      581,  584,  560,  581,  584,  585,  589,  590,  585,  589,
      590,  593,  337,  573,  593,  336,  335,  574,  581,  334,
      576,  333,  332,  585,  331,  330,  329,  327,  325,  577,
      595,  595,  595,  595,  595,  595,  595,  595,  595,  595,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      597,  597,  597,  597,  597,  597,  597,  597,  597,  597,
      598,  598,  598,  598,  598,  598,  598,  598,  598,  598,

      599,  599,  599,  599,  599,  599,  599,  599,  599,  599,
      600,  600,  600,  600,  600,  600,  600,  600,  600,  600,
      601,  601,  324,  601,  601,  601,  601,  601,  601,  601,
      602,  602,  602,  602,  603,  603,  604,  323,  322,  604,
      604,  321,  604,  604,  604,  604,  605,  605,  319,  605,
      605,  605,  605,  605,  605,  605,  606,  318,  317,  606,
      606,  316,  606,  606,  606,  606,  607,  607,  608,  608,
      608,  609,  609,  609,  609,  610,  610,  611,  611,  611,
      314,  611,  611,  611,  611,  611,  612,  612,  312,  612,
      311,  612,  612,  612,  612,  613,  613,  308,  613,  613,

      613,  613,  613,  613,  613,  614,  614,  614,  614,  614,
      614,  614,  614,  614,  614,  615,  615,  271,  615,  269,
      615,  615,  615,  615,  616,  616,  268,  616,  616,  616,
      616,  616,  616,  616,  617,  617,  617,  617,  617,  617,
      617,  617,  617,  617,  618,  618,  618,  618,  263,  618,
      618,  618,  618,  618,  619,  619,  619,  619,  619,  619,
      619,  619,  619,  619,  620,  620,  262,  620,  620,  620,
      620,  620,  620,  620,  621,  621,  260,  621,  621,  621,
      621,  621,  621,  621,  622,  622,  257,  622,  622,  622,
      622,  622,  622,  622,  624,  624,  256,  624,  624,  624,

      624,  624,  624,  624,  626,  626,  254,  626,  626,  626,
      626,  626,  626,  626,  627,  627,  215,  627,  627,  627,
      627,  627,  627,  627,  628,  628,  628,  628,  628,  628,
      628,  628,  628,  628,  629,  629,  213,  629,  629,  629,
      629,  629,  629,  629,  630,  630,  630,  630,  632,  632,
      632,  632,  635,  635,  635,  635,  636,  636,  636,  636,
      638,  638,  638,  638,  212,  211,  208,  207,  206,  202,
      201,  200,  198,  191,  189,  188,  186,  185,  180,  178,
      177,  175,  170,  168,  167,  165,  161,  157,  156,  153,
      150,  149,  148,  146,  143,  141,  138,  136,  134,  132,

       99,   96,   95,   82,   80,   78,   76,   43,   39,   38,
       37,   35,   33,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
      594,  594,  594,  594,  594,  594,  594,  594,  594
    } ;

extern int yy_flex_debug;
int yy_flex_debug = 0;

static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
++(yy_lp); \
goto find_rule; \
}

#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
/*************************************************************************
 *
 * Copyright (c) 2014-2025 Barbara Geller & Ansel Sermersheim
 * Copyright (c) 1997-2014 Dimitri van Heesch

*************************************************************************/

#include <parse_py.h>

#include <config.h>
#include <doxy_globals.h>
#include <entry.h>
#include <message.h>
#include <outputlist.h>
#include <parse_cstyle.h>
#include <tooltip.h>
#include <util.h>

#include <QSharedPointer>
#include <QStack>
#include <QStringList>

#include <stdio.h>

#define DBG_CTX(...)     do { } while(0)

#define YY_NO_INPUT 1

static ClassSDict    s_codeClassSDict;
static QString       s_curClassName;
static QStringList   s_curClassBases;

static QString       s_inputString;        // the code fragment as text
static int	         s_inputPosition;      // read offset during parsing
static QString       s_currentFontClass;
static bool          s_needsTermination;

static bool          s_collectXRefs;
static int           s_inputLines;         // number of line in the code fragment
static int	         s_yyLineNr;           // current line number

static bool          s_includeCodeFragment;
static QString       s_realScope;

static int           s_bodyCurlyCount;
static bool          s_searchingForBody;
static QString       s_classScope;
static int           s_paramParens;

static bool          s_exampleBlock;
static QString       s_exampleName;
static QString       s_type;
static QString       s_name;

static bool          s_doubleStringIsDoc;
static bool          s_doubleQuote;
static bool          s_noSuiteFound;
static int           s_stringContext;

static QString       s_docBlock;
static bool          s_endComment;

static CodeGenerator               *s_code;

static QStack<uint>                 s_indents;           // tracks indentation levels for scoping in python
static QSharedPointer<Definition>   s_searchCtx;
static QSharedPointer<FileDef>      s_sourceFileDef;
static QSharedPointer<Definition>   s_currentDefinition;
static QSharedPointer<MemberDef>    s_currentMemberDef;

static void endFontClass();
static void adjustScopesAndSuites(unsigned indentLength);

/*! Represents a stack of variable to class mappings as found in the
 *  code. Each scope is enclosed in pushScope() and popScope() calls.
 *  Variables are added by calling addVariables() and one can search
 *  for variable using findVariable().
 */
class PyVariableContext
{
   public:
      static QSharedPointer<ClassDef> dummyContext();

      PyVariableContext() {
      }

      virtual ~PyVariableContext() {
      }

      void pushScope() {
         m_scopes.append(new StringMap<QSharedPointer<ClassDef>>);
      }

      void popScope() {
         if (m_scopes.count() > 0) {
            m_scopes.removeAt(m_scopes.count() - 1);
         }
      }

      void clear() {
         m_scopes.clear();
         m_globalScope.clear();
      }

      void clearExceptGlobal() {
         m_scopes.clear();
      }

      void addVariable(const QString &type, const QString &name);
      QSharedPointer<ClassDef> findVariable(const QString &name);

   private:
      StringMap<QSharedPointer<ClassDef>>          m_globalScope;
      QList<StringMap<QSharedPointer<ClassDef>> *> m_scopes;
};

QSharedPointer<ClassDef> PyVariableContext::dummyContext()
{
   static QSharedPointer<ClassDef> dummyContext = QMakeShared<ClassDef>("", 0, 0, "dummyContext-python", CompoundType::Class);
   return dummyContext;
}

void PyVariableContext::addVariable(const QString &type, const QString &name)
{
   QString ltype = type.simplified();
   QString lname = name.simplified();

   StringMap<QSharedPointer<ClassDef>> *scope;

   if (m_scopes.count() == 0 ) {
      scope = &m_globalScope;
   } else {
      scope = m_scopes.last();
   }

   QSharedPointer<ClassDef> varType;

   if ( (varType = s_codeClassSDict[ltype]) || (varType = getResolvedClass(s_currentDefinition, s_sourceFileDef, ltype)) ) {
      // look for class definitions inside the code block
      // look for global class definitions

      scope->insert(lname, varType);

   } else {
      if (m_scopes.count() > 0)  {
         // for local variables add a dummy entry so the name
         // is hidden to avoid false links to global variables with the same name
         // TODO: make this work for namespaces as well

         scope->insert(lname, PyVariableContext::dummyContext());
      }
   }
}

QSharedPointer<ClassDef> PyVariableContext::findVariable(const QString &name)
{
   if (name.isEmpty()) {
      return QSharedPointer<ClassDef>();
   }

   QSharedPointer<ClassDef> result;

   // search from inner to outer scope
   for (int k = m_scopes.size() - 1; k >= 0; --k) {

      result = m_scopes[k]->find(name);

      if (result) {
         return result;
      }
   }

   // nothing found -> also try the global scope
   result = m_globalScope.find(name);

   return result;
}

static PyVariableContext s_theVarContext;

class PyCallContext
{
   public:
      struct Ctx {
         Ctx() : name(s_name), type(s_type), cd(nullptr)
         {}

         QString name;
         QString type;

         QSharedPointer<ClassDef> cd;
      };

      PyCallContext() {
         m_classList.append(new Ctx);
      }

      virtual ~PyCallContext() {}

      void setClass(QSharedPointer<ClassDef> cd) {
         Ctx *ctx = m_classList.last();

         if (ctx) {
            ctx->cd = cd;
         }
      }

      void pushScope() {
         m_classList.append(new Ctx);
      }

      void popScope() {
         if (m_classList.count() > 1) {
            Ctx *ctx = m_classList.last();

            if (ctx) {
               s_name = ctx->name;
               s_type = ctx->type;
            }
            m_classList.removeLast();
         }
      }

      void clear() {
         m_classList.clear();
         m_classList.append(new Ctx);
      }

      QSharedPointer<ClassDef> getClass() const {
         Ctx *ctx = m_classList.last();

         if (ctx) {
            return ctx->cd;
         } else {
            return QSharedPointer<ClassDef>();
         }
      }

   private:
      QList<Ctx *> m_classList;
};

static PyCallContext s_theCallContext;

// counts the number of lines in the input
static int countLines()
{
   int count = 1;

   if (s_inputString.isEmpty() ) {
      return count;
   }

   for (QChar c : s_inputString) {
      if (c == '\n') {
         ++count;
      }
   }

   if (s_inputString.last() != '\n') {
      // last line does not end with a \n, add extra line and explicitly terminate the line after parsing
      ++count;
      s_needsTermination = true;
   }

   return count;
}

static void setCurrentDoc(const QString &anchor)
{
   if (Doxy_Globals::searchIndexBase != nullptr) {
      if (s_searchCtx) {
         Doxy_Globals::searchIndexBase->setCurrentDoc(s_searchCtx, s_searchCtx->anchor(), false);
      } else {
         Doxy_Globals::searchIndexBase->setCurrentDoc(s_sourceFileDef, anchor, true);
      }
   }
}

static void addToSearchIndex(const QString &text)
{
   if (Doxy_Globals::searchIndexBase != nullptr) {
      Doxy_Globals::searchIndexBase->addWord(text, false);
   }
}

static QSharedPointer<ClassDef> stripClassName(const QString &s, QSharedPointer<Definition> d = s_currentDefinition)
{
   int pos = 0;

   QString type = s;
   QString className;
   QString templSpec;

   while (extractClassNameFromType(type, pos, className, templSpec) != -1) {
      QString clName = className + templSpec;

      QSharedPointer<ClassDef> cd;

      if (! s_classScope.isEmpty()) {
         cd = getResolvedClass(d, s_sourceFileDef, s_classScope + "::" + clName);
      }

      if (cd == nullptr) {
         cd = getResolvedClass(d, s_sourceFileDef, clName);
      }

      if (cd) {
         return cd;
      }
   }

   return QSharedPointer<ClassDef>();
}

/* start a new line of code, inserting a line number if s_sourceFileDef
 * is true. If a definition starts at the current line, then the line
 * number is linked to the documentation of that definition.
 */
static void startCodeLine()
{
   if (s_sourceFileDef) {
      QSharedPointer<Definition> d = s_sourceFileDef->getSourceDefinition(s_yyLineNr);

      if (! s_includeCodeFragment && d && d->isLinkableInProject()) {
         s_currentDefinition = d;
         s_currentMemberDef  = s_sourceFileDef->getSourceMember(s_yyLineNr);
         s_endComment        = false;
         s_searchingForBody  = true;

         s_realScope  = d->name();
         s_classScope = d->name();

         s_bodyCurlyCount = 0;

         QString lineAnchor;
         lineAnchor = QString("l%1").formatArg(s_yyLineNr, 5, 10, QChar('0'));

         if (s_currentMemberDef) {
            s_code->writeLineNumber(s_currentMemberDef->getReference(), s_currentMemberDef->getOutputFileBase(),
                  s_currentMemberDef->anchor(), s_yyLineNr);

            setCurrentDoc(lineAnchor);

         } else {
            s_code->writeLineNumber(d->getReference(), d->getOutputFileBase(), QString(), s_yyLineNr);
            setCurrentDoc(lineAnchor);
         }

      } else {
         s_code->writeLineNumber(QString(), QString(), QString(), s_yyLineNr);
      }
   }

   s_code->startCodeLine(s_sourceFileDef != nullptr);

   if (! s_currentFontClass.isEmpty()) {
      s_code->startFontClass(s_currentFontClass);
   }
}

static void codify(const QString &text)
{
   s_code->codify(text);
}

static void endCodeLine()
{
   endFontClass();
   s_code->endCodeLine();
}

static void nextCodeLine()
{
   QString fc = s_currentFontClass;
   endCodeLine();

   if (s_yyLineNr < s_inputLines) {
      s_currentFontClass = fc;
      startCodeLine();
   }
}

static void startFontClass(const QString &s)
{
   // if font class is already set do not stop and start it again
   if (s_currentFontClass != s) {
      endFontClass();
      s_code->startFontClass(s);
      s_currentFontClass = s;
   }
}

static void endFontClass()
{
   if (! s_currentFontClass.isEmpty() ) {
      s_code->endFontClass();
      s_currentFontClass = "";
   }
}

/* writes a link to a fragment \a text that may span multiple lines, inserting
 * line numbers for each line. If \a text contains newlines, the link will be
 * split into multiple links with the same destination, one for each line.
 */
static void writeMultiLineCodeLink(CodeGenerator &ol, QSharedPointer<Definition> d, const QString &text)
{
   static const bool sourceTooltips = Config::getBool("source-tooltips");
   TooltipManager::instance()->addTooltip(d);

   QString ref    = d->getReference();
   QString file   = d->getOutputFileBase();
   QString anchor = d->anchor();
   QString tooltip;

   if (! sourceTooltips) {
      // fall back to simple "title" tooltips
      tooltip = d->briefDescriptionAsTooltip();
   }

   QString tmp;

   for (auto c : text) {

      if (c == '\n') {
         ++s_yyLineNr;

         ol.writeCodeLink(ref, file, anchor, tmp, tooltip);
         nextCodeLine();

         tmp = "";

      } else {
         tmp += c;

      }
   }

   if ( ! tmp.isEmpty() ) {
      ol.writeCodeLink(ref, file, anchor, tmp, tooltip);
   }
}

static void codifyLines(const QString &text)
{
   const QString tmp_currentFontClass = s_currentFontClass;

   QString tmp;

   for (auto c : text) {

      if (c == '\n') {
         ++s_yyLineNr;

         s_code->codify(tmp);
         endCodeLine();

         if (s_yyLineNr < s_inputLines) {
            startCodeLine();
         }

         if (! tmp_currentFontClass.isEmpty()) {
            startFontClass(tmp_currentFontClass);
         }

         tmp = "";

      } else {
         tmp += c;

      }
   }

   if (! tmp.isEmpty() )  {
      s_code->codify(tmp);
   }
}

static bool getLinkInScope(const QString &c, const QString &m,  const QString &memberText,
                           CodeGenerator &ol, const QString &text )
{
   QSharedPointer<MemberDef>    md;
   QSharedPointer<ClassDef>     cd;
   QSharedPointer<FileDef>      fd;
   QSharedPointer<NamespaceDef> nd;
   QSharedPointer<GroupDef>     gd;

   if (getDefs(c, m, "()", md, cd, fd, nd, gd, false, s_sourceFileDef) && md->isLinkable()) {

      QSharedPointer<Definition> d;

      if (md->getOuterScope() == Doxy_Globals::globalScope) {
         d = md->getBodyDef() ;
      } else {
         d = md->getOuterScope();
      }

      if (md->getGroupDef()) {
         d = md->getGroupDef();
      }

      if (d && d->isLinkable()) {
         s_theCallContext.setClass(stripClassName(md->typeString(), md->getOuterScope()));

         if (s_currentDefinition && s_currentMemberDef && md != s_currentMemberDef && s_collectXRefs) {
            addDocCrossReference(s_currentMemberDef, md);
         }

         writeMultiLineCodeLink(ol, md, ! text.isEmpty() ? text : memberText);
         addToSearchIndex(! text.isEmpty() ? text : memberText);

         return true;
      }
   }

   return false;
}

static bool getLink(const QString &className, const QString &memberName, CodeGenerator &ol,
                  const QString &text = QString())
{
   QString m = removeRedundantWhiteSpace(memberName);
   QString c = className;

   if (! getLinkInScope(c, m, memberName, ol, text)) {
      if (! s_curClassName.isEmpty()) {

         if (! c.isEmpty()) {
            c.prepend("::");
         }

         c.prepend(s_curClassName);
         return getLinkInScope(c, m, memberName, ol, text);
      }
      return false;
   }
   return true;
}

/*
  For a given string in the source code,
  finds its class or global id and links to it.
*/
static void generateClassOrGlobalLink(CodeGenerator &ol, const QString &clName, bool typeOnly = false)
{
   QString className = clName;

   // do not do anything for empty text
   if (className.isEmpty()) {
      return;
   }

   DBG_CTX(stderr, "generateClassOrGlobalLink(className=%s)\n", csPrintable(className) );

   QSharedPointer<ClassDef> cd;
   QSharedPointer<ClassDef> lcd;

   // Member def that we may find
   QSharedPointer<MemberDef> md;

   if ((lcd = s_theVarContext.findVariable(className)) == nullptr) {
      // not a local variable

      QSharedPointer<Definition> d = s_currentDefinition;

      QString scope = substitute(className, ".", "::");

      cd = getResolvedClass(d, s_sourceFileDef, substitute(className, ".", "::"), &md);

      DBG_CTX(stderr, "d=%s s_sourceFileDef=%s\n", d ? csPrintable(d->displayName()) : "<null>",
               s_currentDefinition ? csPrintable(s_currentDefinition->displayName()) : "<null>");

      DBG_CTX(stderr, "is found as a type %s\n", cd ? csPrintable(cd->name()) : "<null>");

      if (cd == nullptr && md == nullptr) {
         // also see if it is variable or enum or enum value
         QSharedPointer<NamespaceDef> nd = getResolvedNamespace(scope);

         if (nd) {
            writeMultiLineCodeLink(ol, nd, clName);
            addToSearchIndex(className);
            return;

         } else if (getLink(s_classScope, clName, ol, clName)) {
            return;
         }
      }

   } else {
      if (lcd != PyVariableContext::dummyContext()) {
         s_theCallContext.setClass(lcd);
      }

      DBG_CTX(stderr, "is a local variable cd=%p\n", cd.data());
   }

   if (cd && cd->isLinkable()) { // is it a linkable class
      writeMultiLineCodeLink(ol, cd, clName);
      addToSearchIndex(className);

      if (md) {
         QSharedPointer<Definition> d;

         if (md->getOuterScope() == Doxy_Globals::globalScope) {
            d = md->getBodyDef();
         } else {
            d = md->getOuterScope();
         }

         if (md->getGroupDef()) {
            d = md->getGroupDef();
         }

         if (d && d->isLinkable() && md->isLinkable() && s_currentMemberDef && s_collectXRefs) {
            addDocCrossReference(s_currentMemberDef, md);
         }
      }

   } else { // not a class, maybe a global member
      int scopeEnd = className.lastIndexOf(".");

      if (scopeEnd != -1 && !typeOnly) { // name with explicit scope
         QString scope = substitute(className.left(scopeEnd), ".", "::");
         QString locName = className.right(className.length() - scopeEnd - 1);

         QSharedPointer<ClassDef> mcd = getClass(scope);

         DBG_CTX(stderr, "scope=%s locName=%s mcd=%p\n", csPrintable(scope), csPrintable(locName), mcd.data());

         if (mcd) {
            QSharedPointer<MemberDef> itemMd = mcd->getMemberByName(locName);

            if (itemMd != nullptr) {
               s_theCallContext.setClass(stripClassName(itemMd->typeString(), itemMd->getOuterScope()) );
               writeMultiLineCodeLink(ol, itemMd, clName);
               addToSearchIndex(className);

               QSharedPointer<Definition> d;

               if (itemMd->getOuterScope() == Doxy_Globals::globalScope) {
                  d = itemMd->getBodyDef();
               } else {
                  d = itemMd->getOuterScope();
               }

               if (itemMd->getGroupDef()) {
                  d = itemMd->getGroupDef();
               }

               if (d && d->isLinkable() && itemMd->isLinkable() && s_currentMemberDef && s_collectXRefs) {
                  addDocCrossReference(s_currentMemberDef, itemMd);
               }

               return;
            }

         } else {
            // check namespace as well
            QSharedPointer<NamespaceDef> mnd = getResolvedNamespace(scope);

            if (mnd) {
               QSharedPointer<MemberDef> itemMd = mnd->getMemberByName(locName);

               if (itemMd != nullptr) {
                  s_theCallContext.setClass(stripClassName(itemMd->typeString(), itemMd->getOuterScope()) );
                  writeMultiLineCodeLink(ol, itemMd, clName);
                  addToSearchIndex(className);

                  QSharedPointer<Definition> d;

                  if (itemMd->getOuterScope() == Doxy_Globals::globalScope) {
                     d = itemMd->getBodyDef();

                  } else {
                     d = itemMd->getOuterScope();

                  }

                  if (itemMd->getGroupDef()) {
                     d = itemMd->getGroupDef();
                  }

                  if (d && d->isLinkable() && itemMd->isLinkable() && s_currentMemberDef && s_collectXRefs) {
                     addDocCrossReference(s_currentMemberDef, itemMd);
                  }

                  return;
               }
            }
         }
      }

      // nothing found, just write out the word
      codifyLines(clName);
      addToSearchIndex(clName);
   }
}

// seems to work for file members, but scopes are not being correctly tracked for classes
static void generateFunctionLink(CodeGenerator &ol, const QString &funcName)
{
   QSharedPointer<ClassDef> ccd;

   QString locScope = s_classScope;
   QString locFunc = removeRedundantWhiteSpace(funcName);

   DBG_CTX(stdout, "*** locScope=%s locFunc=%s\n", csPrintable(locScope), csPrintable(locFunc));
   int i = locFunc.lastIndexOf("::");

   if (i > 0) {
      locScope = locFunc.left(i);
      locFunc  = locFunc.right(locFunc.length() - i - 2).trimmed();
   }

   if (! locScope.isEmpty() && (ccd = s_codeClassSDict[locScope])) {

      if (ccd->baseClasses()) {
         for (auto item : *ccd->baseClasses() ) {
            if (getLink(item->classDef->name(), locFunc, ol, funcName)) {
               return;
            }
         }
      }
   }

   if (! getLink(locScope, locFunc, ol, funcName)) {
      generateClassOrGlobalLink(ol, funcName);
   }
   return;
}

static bool findMemberLink(CodeGenerator &ol, QSharedPointer<Definition> def, const QString &name)
{
   if (def->getOuterScope() && def->getOuterScope()->definitionType() == Definition::TypeClass &&
         s_currentDefinition->definitionType() == Definition::TypeClass) {

      QSharedPointer<ClassDef> cd     = def->getOuterScope().dynamicCast<ClassDef>();
      QSharedPointer<ClassDef> thisCd = s_currentDefinition.dynamicCast<ClassDef>();

      if (def->definitionType() == Definition::TypeMember) {
         if (s_currentMemberDef && s_collectXRefs) {
            addDocCrossReference(s_currentMemberDef, def.dynamicCast<MemberDef>());
         }
      }

      DBG_CTX(stderr, "cd=%s thisCd=%s\n", cd ? csPrintable(cd->name()) : "<none>",
                  thisCd ? csPrintable(thisCd->name()) : "<none>");

      // may want to find the nearest base class in case cd is a base class of thisCd

      if (cd == thisCd || (thisCd && thisCd->isBaseClass(cd, true))) {
         writeMultiLineCodeLink(ol, def, name);
         return true;
      }
   }

   return false;
}

static void findMemberLink(CodeGenerator &ol, const QString &phrase)
{
   if (s_currentDefinition) {
      auto iter = Doxy_Globals::glossary().find(phrase);

      while (iter != Doxy_Globals::glossary().end() && iter.key() == phrase) {
         QSharedPointer<Definition> def = sharedFrom(iter.value());

         if (findMemberLink(ol, def, phrase)) {
            return;
         }

         ++iter;
      }
   }

   codify(phrase);
}

#undef  YY_INPUT
#define YY_INPUT(buf,result,max_size) result = yyread(buf, max_size);

static int yyread(char *buf, int max_size)
{
   int len = max_size;

   QString tmp1    = s_inputString.mid(s_inputPosition, max_size);
   QByteArray tmp2 = tmp1.toUtf8();

   while(len > 0 && tmp2.size() > len) {
     len = len / 2;

     tmp1.truncate(len);
     tmp2 = tmp1.toUtf8();
   };

   s_inputPosition += len;
   memcpy(buf, tmp2.constData(), tmp2.size());

   return tmp2.size();
}

#define YY_NO_UNISTD_H 1

#define INITIAL 0
#define Body 1
#define FunctionDec 2
#define FunctionParams 3
#define ClassDec 4
#define ClassInheritance 5
#define Suite 6
#define SuiteCaptureIndent 7
#define SuiteStart 8
#define SuiteMaintain 9
#define SuiteContinuing 10
#define LongString 11
#define SingleQuoteString 12
#define DoubleQuoteString 13
#define TripleString 14
#define DocBlock 15

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
#include <unistd.h>
#endif
    
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals ( void );

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int yylex_destroy ( void );

int yyget_debug ( void );

void yyset_debug ( int debug_flag  );

YY_EXTRA_TYPE yyget_extra ( void );

void yyset_extra ( YY_EXTRA_TYPE user_defined  );

FILE *yyget_in ( void );

void yyset_in  ( FILE * _in_str  );

FILE *yyget_out ( void );

void yyset_out  ( FILE * _out_str  );

			int yyget_leng ( void );

char *yyget_text ( void );

int yyget_lineno ( void );

void yyset_lineno ( int _line_number  );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap ( void );
#else
extern int yywrap ( void );
#endif
#endif

#ifndef YY_NO_UNPUT
    
    static void yyunput ( int c, char *buf_ptr  );
    
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy ( char *, const char *, int );
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen ( const char * );
#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput ( void );
#else
static int input ( void );
#endif

#endif

        static int yy_start_stack_ptr = 0;
        static int yy_start_stack_depth = 0;
        static int *yy_start_stack = nullptr;
    
    static void yy_push_state ( int _new_state );
    
    static void yy_pop_state ( void );
    
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 196608
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(yyin); \
			} \
		}\
\

#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* end tables serialization structures and prototypes */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1

extern int yylex (void);

#define YY_DECL int yylex (void)
#endif /* !YY_DECL */

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    
	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

        /* Create the reject buffer large enough to save one state per allowed character. */
        if ( ! (yy_state_buf) )
            (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
            if ( ! (yy_state_buf) )
                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );

		if ( ! (yy_start) )
			(yy_start) = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			yyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				yy_create_buffer( yyin, YY_BUF_SIZE );
		}

		yy_load_buffer_state(  );
		}

	{

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		yy_cp = (yy_c_buf_p);

		/* Support of yytext. */
		*yy_cp = (yy_hold_char);

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = (yy_start);

		(yy_state_ptr) = (yy_state_buf);
		*(yy_state_ptr)++ = yy_current_state;

yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 595 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			*(yy_state_ptr)++ = yy_current_state;
			++yy_cp;
			}
		while ( yy_current_state != 594 );

yy_find_action:
		yy_current_state = *--(yy_state_ptr);
		(yy_lp) = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
				{
				yy_act = yy_acclist[(yy_lp)];
				if ( yy_act & YY_TRAILING_HEAD_MASK ||
				     (yy_looking_for_trail_begin) )
					{
					if ( yy_act == (yy_looking_for_trail_begin) )
						{
						(yy_looking_for_trail_begin) = 0;
						yy_act &= ~YY_TRAILING_HEAD_MASK;
						break;
						}
					}
				else if ( yy_act & YY_TRAILING_MASK )
					{
					(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
					(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
					(yy_full_match) = yy_cp;
					(yy_full_state) = (yy_state_ptr);
					(yy_full_lp) = (yy_lp);
					}
				else
					{
					(yy_full_match) = yy_cp;
					(yy_full_state) = (yy_state_ptr);
					(yy_full_lp) = (yy_lp);
					break;
					}
				++(yy_lp);
				goto find_rule;
				}
			--yy_cp;
			yy_current_state = *--(yy_state_ptr);
			(yy_lp) = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */

case 1:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      startFontClass("keyword");
      codify(text);
      endFontClass();
      BEGIN( FunctionDec );
   }
	YY_BREAK
case 2:
YY_RULE_SETUP
{
     QString text = QString::fromUtf8(yytext);
      startFontClass("keyword");
      codify(text);
      endFontClass();
      BEGIN( ClassDec );
      }
	YY_BREAK
case 3:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      startFontClass("keywordtype");
      codify(text);
      endFontClass();
   }
	YY_BREAK
case 4:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(code_py_YYtext);
      codify("self.");
		findMemberLink(*s_code, text.mid(5));
   }
	YY_BREAK
case 5:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify("self.");
      findMemberLink(*s_code, text.mid(5));
   }
	YY_BREAK
case 6:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(code_py_YYtext);
      codify("self.");
		findMemberLink(*s_code, text.mid(5));
   }
	YY_BREAK
case 7:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify("self.");
      findMemberLink(*s_code, text.mid(5));
   }
	YY_BREAK
case 8:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(code_py_YYtext);
		codify("cls.");
	   findMemberLink(*s_code, text.mid(4));
   }
	YY_BREAK
case 9:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify("cls.");
      findMemberLink(*s_code, text.mid(4));
   }
	YY_BREAK
case 10:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(code_py_YYtext);
		codify("cls.");
	   findMemberLink(*s_code, text.mid(4));
   }
	YY_BREAK
case 11:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify("cls.");
      findMemberLink(*s_code, text.mid(4));
    }
	YY_BREAK

case 12:
YY_RULE_SETUP
{
   QString text = QString::fromUtf8(yytext);
   generateClassOrGlobalLink(*s_code, text);

   s_curClassName = text;
   s_curClassBases.clear();
   BEGIN( ClassInheritance );
}
	YY_BREAK

case 13:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 14:
YY_RULE_SETUP
{
      // The parser is assuming that ALL identifiers in this state are base classes;
      // it does not check to see that the first parenthesis has been seen.
      // it should probably be more strict about what to accept.

      QString text = QString::fromUtf8(yytext);
      s_curClassBases.append(text);

      generateClassOrGlobalLink(*s_code, text);
   }
	YY_BREAK
case 15:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);

      // Assume this will be a one-line suite;
      // found counter-example in SuiteStart.

      // Push a class scope
      QSharedPointer<ClassDef> classDefToAdd = QMakeShared<ClassDef> ("<code>", 1, 1, s_curClassName,
                  CompoundType::Class, "", "", false);

      s_codeClassSDict.insert(s_curClassName, classDefToAdd);

      for (auto str : s_curClassBases) {

         QSharedPointer<ClassDef> baseDefToAdd;
         baseDefToAdd = s_codeClassSDict[str];

         // Try to find class in global scope

         if (baseDefToAdd == nullptr) {
            baseDefToAdd = getResolvedClass(s_currentDefinition, s_sourceFileDef, str);
         }

         if (baseDefToAdd && baseDefToAdd != classDefToAdd) {
            classDefToAdd->insertBaseClass(baseDefToAdd, str, Protection::Public, Specifier::Normal);
         }
      }

      // Reset class-parsing variables.
      s_curClassName.resize(0);
      s_curClassBases.clear();

      s_noSuiteFound = true;
      BEGIN( SuiteStart );
   }
	YY_BREAK

case 16:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      generateFunctionLink(*s_code, text);
   }
	YY_BREAK
case 17:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
      BEGIN( FunctionParams );
   }
	YY_BREAK

case 18:
YY_RULE_SETUP
{
      // Parses delimiters
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 19:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 20:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
	   codifyLines(text);
   }
	YY_BREAK
case 22:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);

      // assume this will be a one-line suite
      // found counter-example in SuiteStart.

      s_noSuiteFound = true;
      BEGIN( SuiteStart );
   }
	YY_BREAK

case 23:
YY_RULE_SETUP
{
      // Position-sensitive rules, must come AFTER keyword-triggered rules
      // Must come BEFORE identifier NONEMPTY-like rules to syntax highlight.

      QString text = QString::fromUtf8(yytext);
      startFontClass("keyword");
      codify(text);
      endFontClass();
   }
	YY_BREAK
case 24:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      startFontClass("keywordflow");
      codify(text);
      endFontClass();
                               }
	YY_BREAK
case 25:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      generateClassOrGlobalLink(*s_code, text);
   }
	YY_BREAK
case 26:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      generateClassOrGlobalLink(*s_code, text, true);
   }
	YY_BREAK
case 27:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK

case 28:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 29:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      startFontClass("keyword");
      codifyLines(text);
      endFontClass();
      BEGIN(Body);
   }
	YY_BREAK
case 30:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      startFontClass("keyword");
      codifyLines(text);
      endFontClass();

      // no indentation necessary
      s_noSuiteFound = false;
   }
	YY_BREAK
case 31:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      startFontClass("keywordflow");
      codifyLines(text);
      endFontClass();

      // no indentation necessary
      s_noSuiteFound = false;
   }
	YY_BREAK
case 32:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 33:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      if (YY_START == SingleQuoteString || YY_START == DoubleQuoteString || YY_START == TripleString) {
         REJECT;
      }

      yy_push_state(YY_START);
      BEGIN(DocBlock);
      s_docBlock = text;
   }
	YY_BREAK
case 34:
/* rule 34 can match eol */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);

      if ( s_noSuiteFound ) {
         BEGIN ( SuiteCaptureIndent );
      }
   }
	YY_BREAK

case 35:
/* rule 35 can match eol */
YY_RULE_SETUP
{
      // Blankline - ignore, keep looking for indentation
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK
case 36:
YY_RULE_SETUP
{
      // This state lasts momentarily, to check the indentation
      // level that is about to be used
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);

      s_indents.push(yyleng);
      BEGIN( Suite );
   }
	YY_BREAK

case 37:
YY_RULE_SETUP
{
      // This implements poor indentation-tracking should be improved.
      // (translate tabs to space, etc)
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
      adjustScopesAndSuites(yyleng);
   }
	YY_BREAK
case 38:
/* rule 38 can match eol */
YY_RULE_SETUP
{
      // If this ever succeeds, it means that this is a blank line, and
      // can be ignored.
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK
case 39:
YY_RULE_SETUP
{
      // Default rule, matches the empty string, assuming real text starts here.
      // Just go straight to Body
      adjustScopesAndSuites(0);
   }
	YY_BREAK

case 40:
/* rule 40 can match eol */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
      BEGIN( SuiteMaintain );
   }
	YY_BREAK
case 41:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK

/*
      // Single quoted string like 'That\'s a """nice""" string!'
   */
case 43:
/* rule 43 can match eol */
YY_RULE_SETUP
{
      // line continuation
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK
case 44:
YY_RULE_SETUP
{
      // escaped char
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 45:
YY_RULE_SETUP
{
      // triple double quotes
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 46:
YY_RULE_SETUP
{
      // end of the string
      QString text = QString::fromUtf8(yytext);
      codify(text);
      endFontClass();

      BEGIN(s_stringContext);
   }
	YY_BREAK
case 47:
YY_RULE_SETUP
{
      // normal chars
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 48:
YY_RULE_SETUP
{
      // normal char
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK

/*
      // Double quoted string like "That's \"a '''nice'''\" string!"
   */
case 49:
/* rule 49 can match eol */
YY_RULE_SETUP
{
      // line continuation
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK
case 50:
YY_RULE_SETUP
{
      // escpaced char
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 51:
YY_RULE_SETUP
{
      // triple single quotes
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 52:
YY_RULE_SETUP
{
      // end of the string
      QString text = QString::fromUtf8(yytext);
      codify(text);
      endFontClass();

      BEGIN( s_stringContext );
   }
	YY_BREAK
case 53:
YY_RULE_SETUP
{
      // normal chars
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK
case 54:
YY_RULE_SETUP
{
      // normal char
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK

case 55:
case 56:
YY_RULE_SETUP
{

      QString text = QString::fromUtf8(yytext);
      codify(text);

      if (s_doubleQuote == (text[0] == '"')) {
         endFontClass();
         BEGIN(s_stringContext);
      }
    }
	YY_BREAK
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codifyLines(text);
   }
	YY_BREAK
case 59:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
   }
	YY_BREAK

/*
<*>({NONEMPTY}|{EXPCHAR}|{BB})           {
      // This should go one character at a time
      QString text = QString::fromUtf8(yytext);
      codify(text);

      // endFontClass();
      BEGIN(Body);
  }
  */
case 60:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);

      if (YY_START == SingleQuoteString) {
         REJECT;
      }

		startFontClass("stringliteral");
		s_stringContext = YY_START;
		s_doubleQuote   = text[yyleng-1] == '"';
      codify(text);

		BEGIN(TripleString);
   }
	YY_BREAK
case 61:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);

      if (YY_START == DoubleQuoteString) {
         REJECT;
      }

      startFontClass("stringliteral");
      s_stringContext = YY_START;
      s_doubleQuote   = text[yyleng-1] == '"';
      codify(text);

      BEGIN(TripleString);
   }
	YY_BREAK
case 62:
YY_RULE_SETUP
{
      // single quoted string
      QString text = QString::fromUtf8(yytext);

      if (YY_START == SingleQuoteString || YY_START == DoubleQuoteString || YY_START == TripleString) {
         REJECT;
      }

      startFontClass("stringliteral");
      s_stringContext = YY_START;
      codify(text);

      BEGIN(SingleQuoteString);
   }
	YY_BREAK
case 63:
YY_RULE_SETUP
{
      // double quoted string
      QString text = QString::fromUtf8(yytext);

      if (YY_START == SingleQuoteString || YY_START == DoubleQuoteString || YY_START == TripleString) {
         REJECT;
      }

      startFontClass("stringliteral");
      s_stringContext = YY_START;
      codify(text);

      BEGIN(DoubleQuoteString);
   }
	YY_BREAK
case 64:
YY_RULE_SETUP
{
      // contents of current comment line
      QString text = QString::fromUtf8(yytext);
      s_docBlock += text;
   }
	YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
{
      // comment block (next line is also comment line)
      QString text = QString::fromUtf8(yytext);
      s_docBlock += text;
   }
	YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
{
      // comment block ends at the end of this line
      // remove special comment (default config)

      static const bool stripCodeComments = Config::getBool("strip-code-comments");

      if (stripCodeComments)  {
         s_yyLineNr   += s_docBlock.count('\n');
         s_endComment = true;

      } else  {
         // do not remove comment

         startFontClass("comment");
         codifyLines(s_docBlock);
         endFontClass();
      }

      unput(*yytext);
      yy_pop_state();
   }
	YY_BREAK
case 67:
YY_RULE_SETUP
{
      if (YY_START == SingleQuoteString || YY_START == DoubleQuoteString || YY_START == TripleString) {
         REJECT;
      }

      QString text = QString::fromUtf8(yytext);
      yy_push_state(YY_START);

      BEGIN(DocBlock);
      s_docBlock = text;
   }
	YY_BREAK
case 68:
YY_RULE_SETUP
{
      // normal comment
      if (YY_START == SingleQuoteString || YY_START == DoubleQuoteString || YY_START == TripleString) {
         REJECT;
      }

      QString text = QString::fromUtf8(yytext);
      startFontClass("comment");

      codifyLines(text);
      endFontClass();
   }
	YY_BREAK
case 69:
/* rule 69 can match eol */
YY_RULE_SETUP
{
      if (s_endComment) {
         s_endComment = false;
      } else {
         QString text = QString::fromUtf8(yytext);
         codifyLines(text);
      }

      BEGIN(Body);
   }
	YY_BREAK
case 70:
YY_RULE_SETUP
{
      QString text = QString::fromUtf8(yytext);
      codify(text);
      BEGIN(Body);
   }
	YY_BREAK
case 71:
YY_RULE_SETUP
{
      // utf-8 code point
      QString text = QString::fromUtf8(yytext);
      codify(text);
      BEGIN(Body);
   }
	YY_BREAK
case 72:
YY_RULE_SETUP
{
      // catch all
      QString text = QString::fromUtf8(yytext);
      codify(text);
      BEGIN(Body);
   }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Body):
case YY_STATE_EOF(FunctionDec):
case YY_STATE_EOF(FunctionParams):
case YY_STATE_EOF(ClassDec):
case YY_STATE_EOF(ClassInheritance):
case YY_STATE_EOF(Suite):
case YY_STATE_EOF(SuiteCaptureIndent):
case YY_STATE_EOF(SuiteStart):
case YY_STATE_EOF(SuiteMaintain):
case YY_STATE_EOF(SuiteContinuing):
case YY_STATE_EOF(LongString):
case YY_STATE_EOF(SingleQuoteString):
case YY_STATE_EOF(DoubleQuoteString):
case YY_STATE_EOF(TripleString):
case YY_STATE_EOF(DocBlock):
{
      static const bool stripCodeComments = Config::getBool("strip-code-comments");

      if (YY_START == DocBlock) {

         if (! stripCodeComments)  {
            startFontClass("comment");
            codifyLines(s_docBlock);
            endFontClass();
         }
       }

       yyterminate();
   }
	YY_BREAK
case 73:
YY_RULE_SETUP
ECHO;
	YY_BREAK

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = (yy_hold_char);
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * yylex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++(yy_c_buf_p);
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = (yy_c_buf_p);
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer(  ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				(yy_did_buffer_switch_on_eof) = 0;

				if ( yywrap(  ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				(yy_c_buf_p) =
					(yytext_ptr) + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of yylex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = (yytext_ptr);
	int number_to_move, i;
	int ret_val;

	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			(yy_n_chars), num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			yyrestart( yyin  );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
		/* "- 2" to take care of EOB's */
		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
	}

	(yy_n_chars) += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;

	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (void)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    
	yy_current_state = (yy_start);

	(yy_state_ptr) = (yy_state_buf);
	*(yy_state_ptr)++ = yy_current_state;

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 595 )
				yy_c = yy_meta[yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
		*(yy_state_ptr)++ = yy_current_state;
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	int yy_is_jam;
    
	YY_CHAR yy_c = 1;
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 595 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 594);
	if ( ! yy_is_jam )
		*(yy_state_ptr)++ = yy_current_state;

		return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

    static void yyunput (int c, char * yy_bp )
{
	char *yy_cp;
    
    yy_cp = (yy_c_buf_p);

	/* undo effects of setting up yytext */
	*yy_cp = (yy_hold_char);

	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
		{ /* need to shift things up to make room */
		/* +2 for EOB chars. */
		int number_to_move = (yy_n_chars) + 2;
		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
		char *source =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];

		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			*--dest = *--source;

		yy_cp += (int) (dest - source);
		yy_bp += (int) (dest - source);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
			(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;

		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
		}

	*--yy_cp = (char) c;

	(yytext_ptr) = yy_bp;
	(yy_hold_char) = *yy_cp;
	(yy_c_buf_p) = yy_cp;
}

#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (void)
#else
    static int input  (void)
#endif

{
	int c;
    
	*(yy_c_buf_p) = (yy_hold_char);

	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			/* This was really a NUL. */
			*(yy_c_buf_p) = '\0';

		else
			{ /* need more input */
			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
			++(yy_c_buf_p);

			switch ( yy_get_next_buffer(  ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					yyrestart( yyin );

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( yywrap(  ) )
						return 0;

					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput();
#else
					return input();
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					(yy_c_buf_p) = (yytext_ptr) + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
	*(yy_c_buf_p) = '\0';	/* preserve yytext */
	(yy_hold_char) = *++(yy_c_buf_p);

	return c;
}
#endif	/* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void yyrestart  (FILE * input_file )
{
    
	if ( ! YY_CURRENT_BUFFER ){
        yyensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            yy_create_buffer( yyin, YY_BUF_SIZE );
	}

	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
	yy_load_buffer_state(  );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		yypop_buffer_state();
	 *		yypush_buffer_state(new_buffer);
     */
	yyensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	yy_load_buffer_state(  );

	/* We don't actually know whether we did this switch during
	 * EOF (yywrap()) processing, but the only time this flag
	 * is looked at is after yywrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	(yy_did_buffer_switch_on_eof) = 1;
}

static void yy_load_buffer_state  (void)
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	yy_init_buffer( b, file );

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with yy_create_buffer()
 * 
 */
    void yy_delete_buffer (YY_BUFFER_STATE  b )
{
    
	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		yyfree( (void *) b->yy_ch_buf  );

	yyfree( (void *) b  );
}

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a yyrestart() or at EOF.
 */
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	yy_flush_buffer( b );

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then yy_init_buffer was _probably_
     * called from yyrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void yy_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		yy_load_buffer_state(  );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
    	if (new_buffer == nullptr)
		return;

	yyensure_buffer_stack();

	/* This block is copied from yy_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		(yy_buffer_stack_top)++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from yy_switch_to_buffer. */
	yy_load_buffer_state(  );
	(yy_did_buffer_switch_on_eof) = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
void yypop_buffer_state (void)
{
    	if (!YY_CURRENT_BUFFER)
		return;

	yy_delete_buffer(YY_CURRENT_BUFFER );
	YY_CURRENT_BUFFER_LVALUE = nullptr;
	if ((yy_buffer_stack_top) > 0)
		--(yy_buffer_stack_top);

	if (YY_CURRENT_BUFFER) {
		yy_load_buffer_state(  );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void yyensure_buffer_stack (void)
{
	yy_size_t num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));

		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
		(yy_buffer_stack_max) = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return nullptr;

	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = nullptr;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	yy_switch_to_buffer( b  );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to yylex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * 
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       yy_scan_bytes() instead.
 */
YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
    
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
}

/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) (_yybytes_len + 2);
	buf = (char *) yyalloc( n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = yy_scan_buffer( buf, n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

    static void yy_push_state (int  _new_state )
{
    	if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
		{
		yy_size_t new_size;

		(yy_start_stack_depth) += YY_START_STACK_INCR;
		new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );

		if ( ! (yy_start_stack) )
			(yy_start_stack) = (int *) yyalloc( new_size  );

		else
			(yy_start_stack) = (int *) yyrealloc(
					(void *) (yy_start_stack), new_size  );

		if ( ! (yy_start_stack) )
			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
		}

	(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;

	BEGIN(_new_state);
}

    static void yy_pop_state  (void)
{
    	if ( --(yy_start_stack_ptr) < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );

	BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yynoreturn yy_fatal_error (const char* msg )
{
			fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = (yy_hold_char); \
		(yy_c_buf_p) = yytext + yyless_macro_arg; \
		(yy_hold_char) = *(yy_c_buf_p); \
		*(yy_c_buf_p) = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the current line number.
 * 
 */
int yyget_lineno  (void)
{
    
    return yylineno;
}

/** Get the input stream.
 * 
 */
FILE *yyget_in  (void)
{
        return yyin;
}

/** Get the output stream.
 * 
 */
FILE *yyget_out  (void)
{
        return yyout;
}

/** Get the length of the current token.
 * 
 */
int yyget_leng  (void)
{
        return yyleng;
}

/** Get the current token.
 * 
 */

char *yyget_text  (void)
{
        return yytext;
}

/** Set the current line number.
 * @param _line_number line number
 * 
 */
void yyset_lineno (int  _line_number )
{
    
    yylineno = _line_number;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * 
 * @see yy_switch_to_buffer
 */
void yyset_in (FILE *  _in_str )
{
        yyin = _in_str ;
}

void yyset_out (FILE *  _out_str )
{
        yyout = _out_str ;
}

int yyget_debug  (void)
{
        return yy_flex_debug;
}

void yyset_debug (int  _bdebug )
{
        yy_flex_debug = _bdebug ;
}

static int yy_init_globals (void)
{
        /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from yylex_destroy(), so don't allocate here.
     */

    (yy_buffer_stack) = nullptr;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = nullptr;
    (yy_init) = 0;
    (yy_start) = 0;

    (yy_start_stack_ptr) = 0;
    (yy_start_stack_depth) = 0;
    (yy_start_stack) =  nullptr;

    (yy_state_buf) = 0;
    (yy_state_ptr) = 0;
    (yy_full_match) = 0;
    (yy_lp) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = nullptr;
    yyout = nullptr;
#endif

    /* For future reference: Set errno on error, since we are called by
     * yylex_init()
     */
    return 0;
}

/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		yy_delete_buffer( YY_CURRENT_BUFFER  );
		YY_CURRENT_BUFFER_LVALUE = nullptr;
		yypop_buffer_state();
	}

	/* Destroy the stack itself. */
	yyfree((yy_buffer_stack) );
	(yy_buffer_stack) = nullptr;

    /* Destroy the start condition stack. */
        yyfree( (yy_start_stack)  );
        (yy_start_stack) = nullptr;

    yyfree ( (yy_state_buf) );
    (yy_state_buf)  = nullptr;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( );

    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
		
	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s )
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif

void *yyalloc (yy_size_t  size )
{
			return malloc(size);
}

void *yyrealloc  (void * ptr, yy_size_t  size )
{
		
	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);
}

void yyfree (void * ptr )
{
			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

void resetPythonCodeParserState()
{
   s_currentDefinition = QSharedPointer<Definition>();
   s_currentMemberDef  = QSharedPointer<MemberDef>();

   s_doubleStringIsDoc = false;
   s_paramParens = 0;
   s_indents.clear();
   BEGIN( Body );
}

/*
  Examines current stack of white-space indentations;
  re-syncs the parser with the correct scope.
*/
static void adjustScopesAndSuites(unsigned indentLength)
{
   // States to pop
   if (!s_indents.isEmpty() && indentLength < s_indents.top()) {

      while (! s_indents.isEmpty() && indentLength < s_indents.top()) {
         // pop the old suite's indentation
         s_indents.pop();

         s_currentMemberDef = QSharedPointer<MemberDef>();

         if (s_currentDefinition) {
            s_currentDefinition = s_currentDefinition->getOuterScope();
         }
      }
   }

   // Are there any remaining indentation levels for suites?
   if (! s_indents.isEmpty()) {
    BEGIN( Suite );

   } else {
    BEGIN( Body );
   }
}

void parsePythonCode(CodeGenerator &od, const QString &, const QString &s, bool exBlock, const QString &exName,
                     QSharedPointer<FileDef> fd, int startLine, int endLine, bool inlineFragment,
                     QSharedPointer<MemberDef> , bool, QSharedPointer<Definition> searchCtx, bool collectXRefs)
{
   if (s.isEmpty()) {
      return;
   }

   printlex(yy_flex_debug, true, __FILE__, fd ? fd->fileName() : "" );

   TooltipManager::instance()->clearTooltips();
   s_code             = &od;
   s_inputString      = s;
   s_inputPosition    = 0;
   s_currentFontClass = "";
   s_needsTermination = false;
   s_searchCtx        = searchCtx;
   s_collectXRefs     = collectXRefs;

   if (startLine != -1) {
      s_yyLineNr    = startLine;
   } else {
      s_yyLineNr    = 1;
   }

   if (endLine != -1) {
      s_inputLines  = endLine + 1;
   } else {
      s_inputLines  = s_yyLineNr + countLines() - 1;
   }

   s_exampleBlock  = exBlock;
   s_exampleName   = exName;
   s_sourceFileDef = fd;

   s_includeCodeFragment = inlineFragment;

   bool cleanupSourceDef = false;

   if (exBlock && fd == nullptr) {
      // create a dummy filedef for the example
      s_sourceFileDef  = QMakeShared<FileDef>("", (! exName.isEmpty() ? exName : "generated"));
      cleanupSourceDef = true;
   }

   if (s_sourceFileDef) {
      setCurrentDoc("l00001");
   }

   // Starts line 1 on the output
   startCodeLine();

   yyrestart( yyin );
   yylex();

   if (s_needsTermination) {
      endCodeLine();
   }

   if (fd != nullptr) {
      TooltipManager::instance()->writeTooltips(*s_code);
   }

   if (cleanupSourceDef) {
      // clear the temporary file definition used for this example
      s_sourceFileDef = QSharedPointer<FileDef>();
   }

   printlex(yy_flex_debug, false, __FILE__, fd ? fd->fileName() : "" );
}

